From a74e29708d7433e2fe08b44e9a3e34a53258b241 Mon Sep 17 00:00:00 2001 From: Michael Rapp Date: Tue, 3 Oct 2023 17:12:49 +0200 Subject: [PATCH] Add explicit casts. --- .../mlrl/common/input/feature_type_nominal.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cpp/subprojects/common/test/mlrl/common/input/feature_type_nominal.cpp b/cpp/subprojects/common/test/mlrl/common/input/feature_type_nominal.cpp index 8ed0b45aa7..7198a0646e 100644 --- a/cpp/subprojects/common/test/mlrl/common/input/feature_type_nominal.cpp +++ b/cpp/subprojects/common/test/mlrl/common/input/feature_type_nominal.cpp @@ -55,10 +55,10 @@ TEST(NominalFeatureTypeTest, createNominalFeatureVectorFromFortranContiguousView } if (value == -1) { - EXPECT_EQ(indices.size(), 1); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 1); EXPECT_TRUE(indices.find(6) != indices.end()); } else { - EXPECT_EQ(indices.size(), 2); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 2); EXPECT_TRUE(indices.find(0) != indices.end()); EXPECT_TRUE(indices.find(3) != indices.end()); } @@ -106,7 +106,7 @@ TEST(NominalFeatureTypeTest, createBinaryFeatureVectorFromFortranContiguousView) indices.emplace(*it); } - EXPECT_EQ(indices.size(), 2); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 2); EXPECT_TRUE(indices.find(0) != indices.end()); EXPECT_TRUE(indices.find(3) != indices.end()); @@ -192,10 +192,10 @@ TEST(NominalFeatureTypeTest, createNominalFeatureVectorFromDenseCscView) { } if (value == -1) { - EXPECT_EQ(indices.size(), 1); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 1); EXPECT_TRUE(indices.find(6) != indices.end()); } else { - EXPECT_EQ(indices.size(), 2); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 2); EXPECT_TRUE(indices.find(0) != indices.end()); EXPECT_TRUE(indices.find(3) != indices.end()); } @@ -256,7 +256,7 @@ TEST(NominalFeatureTypeTest, createBinaryFeatureVectorFromDenseCscView) { indices.emplace(*it); } - EXPECT_EQ(indices.size(), 2); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 2); EXPECT_TRUE(indices.find(0) != indices.end()); EXPECT_TRUE(indices.find(3) != indices.end()); @@ -346,10 +346,10 @@ TEST(NominalFeatureTypeTest, createNominalFeatureVectorFromCscView) { } if (value == -1) { - EXPECT_EQ(indices.size(), 1); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 1); EXPECT_TRUE(indices.find(6) != indices.end()); } else { - EXPECT_EQ(indices.size(), 2); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 2); EXPECT_TRUE(indices.find(0) != indices.end()); EXPECT_TRUE(indices.find(3) != indices.end()); } @@ -404,7 +404,7 @@ TEST(NominalFeatureTypeTest, createBinaryFeatureVectorFromCscView) { indices.emplace(*it); } - EXPECT_EQ(indices.size(), 2); + EXPECT_EQ(indices.size(), (std::unordered_set::size_type) 2); EXPECT_TRUE(indices.find(0) != indices.end()); EXPECT_TRUE(indices.find(3) != indices.end());