Merge branch 'assimp:master' into master

pull/4839/head
Kazuki Y 2022-12-20 19:24:15 +09:00 committed by GitHub
commit b406ce6707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -97,9 +97,12 @@ AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
if (prop->mType != aiPTI_Buffer) { if (prop->mType != aiPTI_Buffer) {
return AI_FAILURE; return AI_FAILURE;
} }
// std::min has in some cases a conflict with a defined min
#ifdef min
# undef min
#endif
iNum = static_cast<unsigned int>(std::min(static_cast<size_t>(iNum),prop->mDataLength / sizeof(Type))); iNum = static_cast<unsigned int>(std::min(static_cast<size_t>(iNum),prop->mDataLength / sizeof(Type)));
::memcpy(pOut,prop->mData,iNum * sizeof(Type)); std::memcpy(pOut,prop->mData,iNum * sizeof(Type));
if (pMax) { if (pMax) {
*pMax = iNum; *pMax = iNum;
} }