diff options
-rw-r--r-- | include/m_string.inl | 7 |
1 files 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 <algorithm> +#ifndef _MSC_VER + #include <algorithm> + #define __max std::max +#endif template<typename BaseType> CMSimpleStringT<BaseType>::CMSimpleStringT() @@ -853,7 +856,7 @@ int CMStringT<BaseType, StringTraits>::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; |