From 704a187c90b259e2c8b7dba21297055513f3c250 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 18 Sep 2022 18:10:56 +0200 Subject: [PATCH] FIX: Fix not initialized enums in unittest. --- test/unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp b/test/unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp index b7020b5df..2389c0ffc 100644 --- a/test/unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp +++ b/test/unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp @@ -90,7 +90,7 @@ public: EXPECT_NE(nullptr, scene); EXPECT_NE(nullptr, scene->mMaterials); - aiBlendMode blend_mode; + aiBlendMode blend_mode = aiBlendMode_Default; scene->mMaterials[0]->Get(AI_MATKEY_BLEND_FUNC, blend_mode); EXPECT_EQ(aiBlendMode_Additive, blend_mode); } @@ -104,14 +104,14 @@ public: EXPECT_NE(nullptr, scene); EXPECT_NE(nullptr, scene->mMaterials); - int texture_flags; + int texture_flags = 0; scene->mMaterials[0]->Get(AI_MATKEY_TEXFLAGS_DIFFUSE(0), texture_flags); EXPECT_EQ(aiTextureFlags_UseAlpha, texture_flags); // The model has only one texture, a 256 color bitmap with // a palette. Pure blue is the last color in the palette, // and should be the transparency color. - aiColor3D transparency_color; + aiColor3D transparency_color = {}; scene->mMaterials[0]->Get(AI_MATKEY_COLOR_TRANSPARENT, transparency_color); EXPECT_EQ(aiColor3D(0, 0, 255), transparency_color); }