From: Ove Kaaven Date: Tue, 13 Apr 1999 07:19:59 +0000 (+0000) Subject: wxString assignment operator from wx[W]CharBuffer. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/111bb7f2ea92a2d323bd27b833aaad7d9b13ac0b wxString assignment operator from wx[W]CharBuffer. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/string.h b/include/wx/string.h index 8a060da5d4..ac53c0dd08 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -444,11 +444,16 @@ public: wxString& operator=(wxChar ch); // from a C string wxString& operator=(const wxChar *psz); -#if !wxUSE_UNICODE +#if wxUSE_UNICODE + // from wxWCharBuffer + wxString& operator=(const wxWCharBuffer& psz) { return operator=((const wchar_t *)psz); } +#else // from another kind of C string wxString& operator=(const unsigned char* psz); // from a wide string wxString& operator=(const wchar_t *pwz); + // from wxCharBuffer + wxString& operator=(const wxCharBuffer& psz) { return operator=((const char *)psz); } #endif // string concatenation