]> git.saurik.com Git - wxWidgets.git/commitdiff
wxString assignment operator from wx[W]CharBuffer.
authorOve Kaaven <ovek@arcticnet.no>
Tue, 13 Apr 1999 07:19:59 +0000 (07:19 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Tue, 13 Apr 1999 07:19:59 +0000 (07:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index 8a060da5d4757ed88780b54e5eb86a982ecf7903..ac53c0dd08c16c88285684c0bd35335c2e40ccf8 100644 (file)
@@ -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