Skip to content

Commit 25fe977

Browse files
Fix C4305 double truncated to float warnings (#666) (#668)
(cherry picked from commit 433d1cd) Signed-off-by: Jorge J. Perez <[email protected]> Co-authored-by: Jorge J. Perez <[email protected]>
1 parent 68be3c7 commit 25fe977

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphics/src/AssimpLoader_TEST.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ TEST_F(AssimpLoader, LoadGlTF2BoxTransmission)
684684
const common::MaterialPtr mat = mesh->MaterialByIndex(0u);
685685
ASSERT_TRUE(mat.get());
686686
// transmission currently modeled as transparency
687-
EXPECT_FLOAT_EQ(0.1, mat->Transparency());
687+
EXPECT_FLOAT_EQ(0.1f, mat->Transparency());
688688
delete mesh;
689689
#endif
690690
}
@@ -790,8 +790,8 @@ TEST_F(AssimpLoader, LoadGlbPbrAsset)
790790
EXPECT_NE(pbr->MetalnessMapData(), nullptr);
791791
EXPECT_NE(pbr->RoughnessMapData(), nullptr);
792792
// Check pixel values to test metallicroughness texture splitting
793-
EXPECT_FLOAT_EQ(pbr->MetalnessMapData()->Pixel(256, 256).R(), 0.0);
794-
EXPECT_FLOAT_EQ(pbr->RoughnessMapData()->Pixel(256, 256).R(), 124.0 / 255.0);
793+
EXPECT_FLOAT_EQ(pbr->MetalnessMapData()->Pixel(256, 256).R(), 0.0f);
794+
EXPECT_FLOAT_EQ(pbr->RoughnessMapData()->Pixel(256, 256).R(), 124.0f / 255.0f);
795795

796796
// Bug in assimp 5.0.x that doesn't parse coordinate sets properly
797797
// \todo(iche033) Lightmaps are disabled for glb meshes

0 commit comments

Comments
 (0)