update assimp

This commit is contained in:
Garux
2021-12-17 09:47:12 +03:00
parent 1bd3e7ae18
commit cbde9574fb
459 changed files with 17548 additions and 17619 deletions

View File

@@ -160,7 +160,7 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial *pMat,
break;
}
if (!IsSpace(*cur)) {
ASSIMP_LOG_ERROR("Material property" + std::string(pKey) +
ASSIMP_LOG_ERROR("Material property", pKey,
" is a string; failed to parse a float array out of it.");
return AI_FAILURE;
}
@@ -238,7 +238,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial *pMat,
break;
}
if (!IsSpace(*cur)) {
ASSIMP_LOG_ERROR("Material property" + std::string(pKey) +
ASSIMP_LOG_ERROR("Material property", pKey,
" is a string; failed to parse an integer array out of it.");
return AI_FAILURE;
}
@@ -306,8 +306,7 @@ aiReturn aiGetMaterialString(const aiMaterial *pMat,
memcpy(pOut->data, prop->mData + 4, pOut->length + 1);
} else {
// TODO - implement lexical cast as well
ASSIMP_LOG_ERROR("Material property" + std::string(pKey) +
" was found, but is no string");
ASSIMP_LOG_ERROR("Material property", pKey, " was found, but is no string");
return AI_FAILURE;
}
return AI_SUCCESS;
@@ -556,17 +555,23 @@ uint32_t Assimp::ComputeMaterialHash(const aiMaterial *mat, bool includeMatName
}
// ------------------------------------------------------------------------------------------------
void aiMaterial::CopyPropertyList(aiMaterial *pcDest,
void aiMaterial::CopyPropertyList(aiMaterial *const pcDest,
const aiMaterial *pcSrc) {
ai_assert(nullptr != pcDest);
ai_assert(nullptr != pcSrc);
ai_assert(pcDest->mNumProperties <= pcDest->mNumAllocated);
ai_assert(pcSrc->mNumProperties <= pcSrc->mNumAllocated);
unsigned int iOldNum = pcDest->mNumProperties;
const unsigned int iOldNum = pcDest->mNumProperties;
pcDest->mNumAllocated += pcSrc->mNumAllocated;
pcDest->mNumProperties += pcSrc->mNumProperties;
const unsigned int numAllocated = pcDest->mNumAllocated;
aiMaterialProperty **pcOld = pcDest->mProperties;
pcDest->mProperties = new aiMaterialProperty *[pcDest->mNumAllocated];
pcDest->mProperties = new aiMaterialProperty *[numAllocated];
ai_assert(!iOldNum || pcOld);
ai_assert(iOldNum < numAllocated);
if (iOldNum && pcOld) {
for (unsigned int i = 0; i < iOldNum; ++i) {