From bf1f142a72e439e3a1cdc6d67b4c4659dd944262 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 20 Nov 2021 18:40:38 +0100 Subject: [PATCH] Fix warnings --- test/unit/Common/utMesh.cpp | 11 ++++++----- test/unit/utColladaExport.cpp | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/unit/Common/utMesh.cpp b/test/unit/Common/utMesh.cpp index da0c1084d..c1a532407 100644 --- a/test/unit/Common/utMesh.cpp +++ b/test/unit/Common/utMesh.cpp @@ -60,7 +60,7 @@ protected: }; TEST_F(utMesh, emptyMeshHasNoContentTest) { - EXPECT_EQ(0, mesh->mName.length); + EXPECT_EQ(0u, mesh->mName.length); EXPECT_FALSE(mesh->HasPositions()); EXPECT_FALSE(mesh->HasFaces()); EXPECT_FALSE(mesh->HasNormals()); @@ -69,8 +69,8 @@ TEST_F(utMesh, emptyMeshHasNoContentTest) { EXPECT_FALSE(mesh->HasVertexColors(AI_MAX_NUMBER_OF_COLOR_SETS)); EXPECT_FALSE(mesh->HasTextureCoords(0)); EXPECT_FALSE(mesh->HasTextureCoords(AI_MAX_NUMBER_OF_TEXTURECOORDS)); - EXPECT_EQ(0, mesh->GetNumUVChannels()); - EXPECT_EQ(0, mesh->GetNumColorChannels()); + EXPECT_EQ(0u, mesh->GetNumUVChannels()); + EXPECT_EQ(0u, mesh->GetNumColorChannels()); EXPECT_FALSE(mesh->HasBones()); EXPECT_FALSE(mesh->HasTextureCoordsName(0)); EXPECT_FALSE(mesh->HasTextureCoordsName(AI_MAX_NUMBER_OF_TEXTURECOORDS)); @@ -80,8 +80,8 @@ TEST_F(utMesh, setTextureCoordsName) { EXPECT_FALSE(mesh->HasTextureCoordsName(0)); const aiString texcoords_name("texcoord_name"); mesh->SetTextureCoordsName(0, texcoords_name); - EXPECT_TRUE(mesh->HasTextureCoordsName(0)); - EXPECT_FALSE(mesh->HasTextureCoordsName(1)); + EXPECT_TRUE(mesh->HasTextureCoordsName(0u)); + EXPECT_FALSE(mesh->HasTextureCoordsName(1u)); ASSERT_NE(nullptr, mesh->mTextureCoordsNames); ASSERT_NE(nullptr, mesh->mTextureCoordsNames[0]); EXPECT_STREQ(texcoords_name.C_Str(), mesh->mTextureCoordsNames[0]->C_Str()); @@ -94,3 +94,4 @@ TEST_F(utMesh, setTextureCoordsName) { EXPECT_EQ(nullptr, mesh->mTextureCoordsNames[0]); EXPECT_EQ(nullptr, mesh->GetTextureCoordsName(0)); } + diff --git a/test/unit/utColladaExport.cpp b/test/unit/utColladaExport.cpp index d0c22ffb8..e588872f0 100644 --- a/test/unit/utColladaExport.cpp +++ b/test/unit/utColladaExport.cpp @@ -124,9 +124,9 @@ TEST_F(utColladaExport, testExportLight) { ASSERT_NE(pTest, nullptr); ASSERT_TRUE(pTest->HasLights()); - const unsigned int origNumLights(pTest->mNumLights); + const unsigned int origNumLights = pTest->mNumLights; // There are FIVE!!! LIGHTS!!! - EXPECT_EQ(5, origNumLights) << "lights.dae should contain five lights"; + EXPECT_EQ(5u, origNumLights) << "lights.dae should contain five lights"; std::vector origLights(5); for (size_t i = 0; i < origNumLights; i++) {