Parcourir la source

Merge pull request #1 from marcappelsmeier/fixDeprecatedArrayComparision

Fix warning for array comparison
Marc il y a 4 ans
Parent
commit
ad0d945c80
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      code/AssetLib/glTF2/glTF2Importer.cpp

+ 1 - 1
code/AssetLib/glTF2/glTF2Importer.cpp

@@ -312,7 +312,7 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
         if (mat.materialSheen.isPresent) {
             MaterialSheen &sheen = mat.materialSheen.value;
             // Default value {0,0,0} disables Sheen
-            if (sheen.sheenColorFactor != defaultSheenFactor) {
+            if (std::memcmp(sheen.sheenColorFactor, defaultSheenFactor, sizeof(glTFCommon::vec3)) != 0) {
                 SetMaterialColorProperty(r, sheen.sheenColorFactor, aimat, AI_MATKEY_SHEEN_COLOR_FACTOR);
                 aimat->AddProperty(&sheen.sheenRoughnessFactor, 1, AI_MATKEY_SHEEN_ROUGHNESS_FACTOR);
                 SetMaterialTextureProperty(embeddedTexIdxs, r, sheen.sheenColorTexture, aimat, AI_MATKEY_SHEEN_COLOR_TEXTURE);