From 353a4edc6ebdb88d0040de2f13aabfa8accf014b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Apr 2007 20:14:18 +0000 Subject: [PATCH] added implicit conversion of wxString to const void * for compatibility with the code doing things like file.Write(s, len) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/string.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/wx/string.h b/include/wx/string.h index 07e7e86992..33c57f68e0 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -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(); } -- 2.45.2