closes https://github.com/assimp/assimp/issues/2431: use irrXml directly for mingw compiler.

pull/2510/head
Kim Kulling 2019-06-12 22:12:38 +02:00
parent a4907e54b1
commit 0021c93892
2 changed files with 8 additions and 6 deletions

View File

@ -96,12 +96,12 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
ai_real* pOut, ai_real* pOut,
unsigned int* pMax) unsigned int* pMax)
{ {
ai_assert( pOut != NULL ); ai_assert( pOut != nullptr );
ai_assert( pMat != NULL ); ai_assert( pMat != nullptr );
const aiMaterialProperty* prop; const aiMaterialProperty* prop;
aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop); aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop);
if (!prop) { if ( nullptr == prop) {
return AI_FAILURE; return AI_FAILURE;
} }
@ -112,9 +112,11 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
if (pMax) { if (pMax) {
iWrite = std::min(*pMax,iWrite); ; iWrite = std::min(*pMax,iWrite); ;
} }
for (unsigned int a = 0; a < iWrite;++a) {
pOut[a] = static_cast<ai_real> ( reinterpret_cast<float*>(prop->mData)[a] ); for (unsigned int a = 0; a < iWrite; ++a) {
pOut[ a ] = static_cast<ai_real> ( reinterpret_cast<float*>(prop->mData)[a] );
} }
if (pMax) { if (pMax) {
*pMax = iWrite; *pMax = iWrite;
} }

View File

@ -1,6 +1,6 @@
ply ply
format ascii 1.0 format ascii 1.0
comment Created by Open Asset Import Library - http://assimp.sf.net (v4.1.4151146389) comment Created by Open Asset Import Library - http://assimp.sf.net (v4.1.2760932948)
element vertex 8 element vertex 8
property float x property float x
property float y property float y