Fix warning for array comparison
The code previously compared two float arrays with the != operator. This is deprecated in Visual Studio 2019 and results in a warning that leads to an error when compiling with warnings as errors. Small fix to make the build work.pull/4110/head
parent
babf3b8e3d
commit
656b0b25d8
|
@ -312,7 +312,7 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
|
||||||
if (mat.materialSheen.isPresent) {
|
if (mat.materialSheen.isPresent) {
|
||||||
MaterialSheen &sheen = mat.materialSheen.value;
|
MaterialSheen &sheen = mat.materialSheen.value;
|
||||||
// Default value {0,0,0} disables Sheen
|
// 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);
|
SetMaterialColorProperty(r, sheen.sheenColorFactor, aimat, AI_MATKEY_SHEEN_COLOR_FACTOR);
|
||||||
aimat->AddProperty(&sheen.sheenRoughnessFactor, 1, AI_MATKEY_SHEEN_ROUGHNESS_FACTOR);
|
aimat->AddProperty(&sheen.sheenRoughnessFactor, 1, AI_MATKEY_SHEEN_ROUGHNESS_FACTOR);
|
||||||
SetMaterialTextureProperty(embeddedTexIdxs, r, sheen.sheenColorTexture, aimat, AI_MATKEY_SHEEN_COLOR_TEXTURE);
|
SetMaterialTextureProperty(embeddedTexIdxs, r, sheen.sheenColorTexture, aimat, AI_MATKEY_SHEEN_COLOR_TEXTURE);
|
||||||
|
|
Loading…
Reference in New Issue