From d27df9286f2f8b6df5713c756244c83f2585f53e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Nov 2021 22:02:48 +0300 Subject: compilation fix --- include/m_string.inl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/m_string.inl b/include/m_string.inl index 18498889ee..5d88876756 100644 --- a/include/m_string.inl +++ b/include/m_string.inl @@ -25,7 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_STRING_INL__ -#include +#ifndef _MSC_VER + #include + #define __max std::max +#endif template CMSimpleStringT::CMSimpleStringT() @@ -853,7 +856,7 @@ int CMStringT::Replace(PCXSTR pszOld, PCXSTR pszNew) int nOldLength = this->GetLength(); int nNewLength = nOldLength + (nReplacementLen - nSourceLen)*nCount; - PXSTR pszBuffer = this->GetBuffer(std::max(nNewLength, nOldLength)); + PXSTR pszBuffer = this->GetBuffer(__max(nNewLength, nOldLength)); PXSTR pszStart = pszBuffer; PXSTR pszEnd = pszStart + nOldLength; -- cgit v1.2.3