X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2523e9b70044baa92a1c63ffdfe179c28ad53536..291b0f5b14b62be240ae5cb1ec2ade3d8db6a776:/src/common/stringimpl.cpp diff --git a/src/common/stringimpl.cpp b/src/common/stringimpl.cpp index 3cafa8bf80..af847b54e1 100644 --- a/src/common/stringimpl.cpp +++ b/src/common/stringimpl.cpp @@ -30,6 +30,7 @@ #ifndef WX_PRECOMP #include "wx/stringimpl.h" + #include "wx/wxcrt.h" #endif #include @@ -162,9 +163,9 @@ void wxStringImpl::InitWith(const wxStringCharType *psz, // if the length is not given, assume the string to be NUL terminated if ( nLength == npos ) { - wxASSERT_MSG( nPos <= Strsize(psz), _T("index out of bounds") ); + wxASSERT_MSG( nPos <= wxStrlen(psz), _T("index out of bounds") ); - nLength = Strsize(psz + nPos); + nLength = wxStrlen(psz + nPos); } STATISTICS_ADD(InitialLength, nLength); @@ -426,7 +427,7 @@ wxStringImpl& wxStringImpl::insert(size_t nPos, { wxASSERT( nPos <= length() ); - if ( n == npos ) n = Strsize(sz); + if ( n == npos ) n = wxStrlen(sz); if ( n == 0 ) return *this; if ( !Alloc(length() + n) || !CopyBeforeWrite() ) { @@ -666,7 +667,7 @@ wxStringImpl& wxStringImpl::operator=(wxStringCharType ch) // assigns C string wxStringImpl& wxStringImpl::operator=(const wxStringCharType *psz) { - if ( !AssignCopy(Strsize(psz), psz) ) { + if ( !AssignCopy(wxStrlen(psz), psz) ) { wxFAIL_MSG( _T("out of memory in wxStringImpl::operator=(const wxStringCharType *)") ); } return *this; @@ -769,7 +770,7 @@ wxStringCharType *wxStringImpl::DoGetWriteBuf(size_t nLen) // put string back in a reasonable state after GetWriteBuf void wxStringImpl::DoUngetWriteBuf() { - DoUngetWriteBuf(Strsize(m_pchData)); + DoUngetWriteBuf(wxStrlen(m_pchData)); } void wxStringImpl::DoUngetWriteBuf(size_t nLen)