From f8a4859664ba502cefddf124f8601312ca167ffc Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Fri, 2 Feb 2018 12:18:41 +0100 Subject: [PATCH] [MatL] Add a cast to int for material ids size. Fixes a warning. --- MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp b/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp index 2058d3e0861..03d805e3b9a 100644 --- a/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp +++ b/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp @@ -89,7 +89,7 @@ PorousMediaProperties createPorousMediaProperties( int const max_material_id = *std::max_element(material_ids.cbegin(), material_ids.cend()); - if (max_material_id > mat_ids.size() - 1) + if (max_material_id > static_cast<int>(mat_ids.size() - 1)) OGS_FATAL( "The maximum value of MaterialIDs in mesh is %d. As the " "given number of porous media definitions in the project " @@ -97,7 +97,7 @@ PorousMediaProperties createPorousMediaProperties( "(index starts with zero).", max_material_id, mat_ids.size(), max_material_id - 1); - if (max_material_id < mat_ids.size() - 1) + if (max_material_id < static_cast<int>(mat_ids.size() - 1)) WARN( "There are %d porous medium definitions in the project file but " "only %d different values in the MaterialIDs vector/data_array in " -- GitLab