Fix strict aliasing violation in MaterialSystem
parent
6aa32b41a1
commit
bbb60c29f0
|
@ -354,8 +354,9 @@ aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
|
||||||
return AI_FAILURE;
|
return AI_FAILURE;
|
||||||
}
|
}
|
||||||
// Determine mapping type
|
// Determine mapping type
|
||||||
aiTextureMapping mapping = aiTextureMapping_UV;
|
int mapping_ = static_cast<int>(aiTextureMapping_UV);
|
||||||
aiGetMaterialInteger(mat,AI_MATKEY_MAPPING(type,index),(int*)&mapping);
|
aiGetMaterialInteger(mat,AI_MATKEY_MAPPING(type,index), &mapping_);
|
||||||
|
aiTextureMapping mapping = static_cast<aiTextureMapping>(mapping_);
|
||||||
if (_mapping)
|
if (_mapping)
|
||||||
*_mapping = mapping;
|
*_mapping = mapping;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue