From: Vadim Zeitlin Date: Thu, 22 Mar 2007 19:24:41 +0000 (+0000) Subject: added explicit conversion of wxCStrData to const void * to resolve ambiguity between... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/17709275f90afe4a05c15806c944ce49c056d4c2?ds=inline added explicit conversion of wxCStrData to const void * to resolve ambiguity between const char * and const unsigned char * conversion when passing s.c_str() to e.g. file output functions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/string.h b/include/wx/string.h index 73a09e30cc..2e9b06f590 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -798,6 +798,7 @@ public: const char* AsChar() const; const unsigned char* AsUnsignedChar() const { return (const unsigned char *) AsChar(); } + operator const void*() const { return AsChar(); } operator const char*() const { return AsChar(); } operator const unsigned char*() const { return AsUnsignedChar(); } #endif