From f44121378e745e12bc946860c56eda9d797aef63 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Mar 2020 15:53:30 +0100 Subject: [PATCH] Apply implicit encoding check to wxDataFormat ctor in wxMSW too This is similar to what had been already done in wxGTK. --- include/wx/msw/ole/dataform.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/wx/msw/ole/dataform.h b/include/wx/msw/ole/dataform.h index b86ac09bb3..af239eb3ec 100644 --- a/include/wx/msw/ole/dataform.h +++ b/include/wx/msw/ole/dataform.h @@ -27,7 +27,9 @@ public: // wxString don't apply when we already rely on implicit conversion of a, // for example, "char *" string to wxDataFormat, and existing code does it wxDataFormat(const wxString& format) { SetId(format); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxDataFormat(const char *format) { SetId(format); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxDataFormat(const wchar_t *format) { SetId(format); } wxDataFormat(const wxCStrData& format) { SetId(format); }