diff --git a/include/assimp/material.inl b/include/assimp/material.inl index 0f80fdecc..342c26646 100644 --- a/include/assimp/material.inl +++ b/include/assimp/material.inl @@ -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(std::min(static_cast(iNum),prop->mDataLength / sizeof(Type))); std::memcpy(pOut,prop->mData,iNum * sizeof(Type)); if (pMax) {