diff --git a/src/engine/shared/demo.cpp b/src/engine/shared/demo.cpp index 7718f26bd..f9a3f0f59 100644 --- a/src/engine/shared/demo.cpp +++ b/src/engine/shared/demo.cpp @@ -529,7 +529,7 @@ void CDemoPlayer::ScanFile() } // copy all the frames to an array instead for fast access - m_pKeyFrames = (CKeyFrame *)calloc(std::max(m_Info.m_SeekablePoints, 1), sizeof(CKeyFrame)); + m_pKeyFrames = (CKeyFrame *)calloc(maximum(m_Info.m_SeekablePoints, 1), sizeof(CKeyFrame)); for(pCurrentKey = pFirstKey, i = 0; pCurrentKey; pCurrentKey = pCurrentKey->m_pNext, i++) m_pKeyFrames[i] = pCurrentKey->m_Frame; diff --git a/src/game/editor/io.cpp b/src/game/editor/io.cpp index bc78e400b..cbda8576d 100644 --- a/src/game/editor/io.cpp +++ b/src/game/editor/io.cpp @@ -270,7 +270,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) Size += str_length(m_lSettings[i].m_aCommand) + 1; } - char *pSettings = (char *)malloc(std::max(Size, 1)); + char *pSettings = (char *)malloc(maximum(Size, 1)); char *pNext = pSettings; for(int i = 0; i < m_lSettings.size(); i++) { @@ -536,7 +536,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) // save points int TotalSize = sizeof(CEnvPoint) * PointCount; - CEnvPoint *pPoints = (CEnvPoint *)calloc(std::max(PointCount, 1), sizeof(*pPoints)); + CEnvPoint *pPoints = (CEnvPoint *)calloc(maximum(PointCount, 1), sizeof(*pPoints)); PointCount = 0; for(int e = 0; e < m_lEnvelopes.size(); e++)