]> git.saurik.com Git - wxWidgets.git/commitdiff
added implicit conversion of wxString to const void * for compatibility with the...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Apr 2007 20:14:18 +0000 (20:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Apr 2007 20:14:18 +0000 (20:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index 07e7e86992f4aa4223eb9d1d9c58e52c63e15d23..33c57f68e07cfdaa55efcae41eff525db87b1fb4 100644 (file)
@@ -1075,6 +1075,11 @@ public:
     operator const char*() const { return c_str(); }
     operator const wchar_t*() const { return c_str(); }
 
+    // implicit conversion to untyped pointer for compatibility with previous
+    // wxWidgets versions: this is the same as conversion to const char * so it
+    // may fail!
+    operator const void*() const { return c_str(); }
+
     // identical to c_str(), for MFC compatibility
     const wxCStrData GetData() const { return c_str(); }