From a4feedcb161934159a5e3059c92ebcba9a3ab6cc Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Sun, 8 Dec 2024 18:32:16 +0100 Subject: [PATCH] Remove Conda Windows warnings (#652) * Missing include * Fix warnings in Conda Windows --------- Signed-off-by: Jose Luis Rivero --- graphics/src/AssimpLoader.cc | 1 + graphics/src/AssimpLoader_TEST.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/graphics/src/AssimpLoader.cc b/graphics/src/AssimpLoader.cc index 4b215d28..742cfe37 100644 --- a/graphics/src/AssimpLoader.cc +++ b/graphics/src/AssimpLoader.cc @@ -40,6 +40,7 @@ #include // C++ importer interface #include // Post processing flags #include // Output data structure +#include // Disable warning for converting double to unsigned char #ifdef _WIN32 diff --git a/graphics/src/AssimpLoader_TEST.cc b/graphics/src/AssimpLoader_TEST.cc index 0c0ff578..477298f8 100644 --- a/graphics/src/AssimpLoader_TEST.cc +++ b/graphics/src/AssimpLoader_TEST.cc @@ -684,7 +684,7 @@ TEST_F(AssimpLoader, LoadGlTF2BoxTransmission) const common::MaterialPtr mat = mesh->MaterialByIndex(0u); ASSERT_TRUE(mat.get()); // transmission currently modeled as transparency - EXPECT_FLOAT_EQ(0.1, mat->Transparency()); + EXPECT_FLOAT_EQ(0.1f, mat->Transparency()); delete mesh; #endif } @@ -791,7 +791,7 @@ TEST_F(AssimpLoader, LoadGlbPbrAsset) EXPECT_NE(pbr->RoughnessMapData(), nullptr); // Check pixel values to test metallicroughness texture splitting EXPECT_FLOAT_EQ(pbr->MetalnessMapData()->Pixel(256, 256).R(), 0.0); - EXPECT_FLOAT_EQ(pbr->RoughnessMapData()->Pixel(256, 256).R(), 124.0 / 255.0); + EXPECT_FLOAT_EQ(pbr->RoughnessMapData()->Pixel(256, 256).R(), 124.0f / 255.0f); // Bug in assimp 5.0.x that doesn't parse coordinate sets properly // \todo(iche033) Lightmaps are disabled for glb meshes