X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/830f8f11bca5c0892ae767ba14790c8b5b59011f..6493aacaeb7b22b9fa35c559f7753e9fec0da71f:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index de7500d0b2..aa039f976b 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1013,13 +1013,7 @@ wxString::wxString(const char *psz, const wxMBConv& conv, size_t nLength) { if ( nLength == npos ) { - nLength = (size_t)-1; - } - else if ( nLength == length() ) - { - // this is important to avoid copying the string in cMB2WC: we're - // already NUL-terminated so we can pass this NUL with the data - nLength++; + nLength = wxNO_LEN; } size_t nLenWide; @@ -1048,13 +1042,7 @@ wxString::wxString(const wchar_t *pwz, const wxMBConv& conv, size_t nLength) { if ( nLength == npos ) { - nLength = (size_t)-1; - } - else if ( nLength == length() ) - { - // this is important to avoid copying the string in cMB2WC: we're - // already NUL-terminated so we can pass this NUL with the data - nLength++; + nLength = wxNO_LEN; } size_t nLenMB;