]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/string.h
More efficient access to name and value
[wxWidgets.git] / include / wx / string.h
index 58a6ed7cd8fe86d1cb545f6bd4031a899d069a91..1ab7bd3446ce76aec850a55c2ead0dc55b834300 100644 (file)
@@ -1800,7 +1800,8 @@ public:
     // version for NUL-terminated data:
     static wxString From8BitData(const char *data)
       { return wxString(data); }
-    const char *To8BitData() const { return c_str(); }
+    const wxScopedCharBuffer To8BitData() const
+        { return wxScopedCharBuffer::CreateNonOwned(wx_str(), length()); }
 #endif // Unicode/ANSI
 
     // conversions with (possible) format conversions: have to return a