diff options
Diffstat (limited to 'include/m_string.inl')
-rw-r--r-- | include/m_string.inl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/m_string.inl b/include/m_string.inl index 6a4ec0f35b..18498889ee 100644 --- a/include/m_string.inl +++ b/include/m_string.inl @@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_STRING_INL__ +#include <algorithm> + template<typename BaseType> CMSimpleStringT<BaseType>::CMSimpleStringT() { @@ -851,7 +853,7 @@ int CMStringT<BaseType, StringTraits>::Replace(PCXSTR pszOld, PCXSTR pszNew) int nOldLength = this->GetLength(); int nNewLength = nOldLength + (nReplacementLen - nSourceLen)*nCount; - PXSTR pszBuffer = this->GetBuffer(__max(nNewLength, nOldLength)); + PXSTR pszBuffer = this->GetBuffer(std::max(nNewLength, nOldLength)); PXSTR pszStart = pszBuffer; PXSTR pszEnd = pszStart + nOldLength; @@ -1341,7 +1343,7 @@ typename CMStringT<BaseType, StringTraits>::PCXSTR CMStringT<BaseType, StringTra va_start(argList, pszFormat); FormatV(pszFormat, argList); va_end(argList); - return GetString(); + return this->GetString(); } // Append formatted data using format string 'pszFormat' @@ -1352,7 +1354,7 @@ typename CMStringT<BaseType, StringTraits>::PCXSTR CMStringT<BaseType, StringTra va_start(argList, pszFormat); AppendFormatV(pszFormat, argList); va_end(argList); - return GetString(); + return this->GetString(); } template< typename BaseType, class StringTraits > @@ -1372,7 +1374,7 @@ typename CMStringT<BaseType, StringTraits>::PCXSTR CMStringT<BaseType, StringTra PXSTR pszBuffer = this->GetBuffer(nLength); StringTraits::Format(pszBuffer, nLength + 1, pszFormat, args); this->ReleaseBufferSetLength(nLength); - return GetString(); + return this->GetString(); } // Set the string to the value of environment variable 'pszVar' @@ -1398,7 +1400,7 @@ BOOL CMStringT<BaseType, StringTraits>::GetEnvironmentVariable(PCXSTR pszVar) template< typename BaseType, class StringTraits > typename CMStringT<BaseType, StringTraits>::PXSTR CMStringT<BaseType, StringTraits>::Detach() const { - return StringTraits::MirCopy(CMStringT<BaseType, StringTraits>::GetString(), GetLength()); + return StringTraits::MirCopy(CMStringT<BaseType, StringTraits>::GetString(), this->GetLength()); } ///////////////////////////////////////////////////////////////////////////////////////// |