From e0a8f108f86b1f75f55e5d2ab90a90e1355267af Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Tue, 29 Oct 2024 08:49:43 +0100 Subject: [PATCH] [T] Fix warnings on Windows. --- Tests/ParameterLib/Parameter.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Tests/ParameterLib/Parameter.cpp b/Tests/ParameterLib/Parameter.cpp index f28fb2dc415..a6821e0afa5 100644 --- a/Tests/ParameterLib/Parameter.cpp +++ b/Tests/ParameterLib/Parameter.cpp @@ -183,7 +183,10 @@ TEST_F(ParameterLibParameter, GetNodalValuesOnElement_node) // For all elements all nodes have the value of the node id. auto expected_value = [](MeshLib::Element* const e, std::size_t const local_node_id) - { return static_cast<double>(e->getNode(local_node_id)->getID()); }; + { + return static_cast<double>( + e->getNode(static_cast<unsigned>(local_node_id))->getID()); + }; ASSERT_TRUE(testNodalValuesOfElement(meshes[0]->getElements(), expected_value, *parameter, t)); @@ -246,7 +249,11 @@ TEST_F(ParameterLibParameter, GetNodalValuesOnElement_curveScaledNode) // For all elements all nodes have the value of the node id times the time. auto expected_value = [&t](MeshLib::Element* const e, std::size_t const local_node_id) - { return static_cast<double>(e->getNode(local_node_id)->getID()) * t; }; + { + return static_cast<double>( + e->getNode(static_cast<unsigned>(local_node_id))->getID()) * + t; + }; ASSERT_TRUE(testNodalValuesOfElement(meshes[0]->getElements(), expected_value, *parameter, t)); -- GitLab