]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxString::operator=(const wxCStrData&) to make it possible to compile code...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 19 Mar 2007 13:19:56 +0000 (13:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 19 Mar 2007 13:19:56 +0000 (13:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index 90d3b378f29702a9cc09813edd8dd63532c23276..65edbb87e017ff092629312c29bf1f39a5a104ad 100644 (file)
@@ -1144,6 +1144,7 @@ public:
     // from another wxString
   wxString& operator=(const wxStringBase& stringSrc)
     { return (wxString&)wxStringBase::operator=(stringSrc); }
+  wxString& operator=(const wxCStrData& cstr);
     // from a character
   wxString& operator=(wxUniChar ch)
     { return (wxString&)wxStringBase::operator=(ch); }
@@ -2013,6 +2014,15 @@ inline wxUniChar wxCStrData::operator[](size_t n) const
     return m_str->at(m_offset + n);
 }
 
+// ----------------------------------------------------------------------------
+// implementation of wxString inline methods using wxCStrData
+// ----------------------------------------------------------------------------
+
+inline wxString& wxString::operator=(const wxCStrData& cstr)
+{
+    return *this = cstr.AsString();
+}
+
 // ----------------------------------------------------------------------------
 // implementation of wx[W]CharBuffer inline methods using wxCStrData
 // ----------------------------------------------------------------------------