Update material.inl

pull/4846/head
Kim Kulling 2022-12-19 08:58:45 +01:00 committed by GitHub
parent 6743274b31
commit 76de8ba1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -97,9 +97,10 @@ AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
if (prop->mType != aiPTI_Buffer) {
return AI_FAILURE;
}
#undef max
#undef min
// 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)));
std::memcpy(pOut,prop->mData,iNum * sizeof(Type));
if (pMax) {