X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca5e07c7683a6b4c63dc6d4d05c75ba46d0b0de8..245f35816d761212279e8cf223475efb7a367553:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index d0b3facc6b..9f97667da3 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -164,10 +164,13 @@ wxSTD ostream& operator<<(wxSTD ostream& os, const wxString& str) // wxStringData class deallocation // =========================================================================== +#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL) +# pragma message (__FILE__ ": building with Multithreaded non DLL runtime has a performance impact on wxString!") void wxStringData::Free() { free(this); } +#endif // =========================================================================== // wxString class core @@ -264,6 +267,7 @@ wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength) if ( conv.MB2WC(m_pchData, psz, nLen + 1) != (size_t)-1 ) { // initialized ok + m_pchData[nLen] = 0; return; } //else: the conversion failed -- leave the string empty (what else?) @@ -770,7 +774,7 @@ wxString wxString::FromAscii(const char ascii) wxString res; res += (wchar_t)(unsigned char) ascii; - + return res; }