From 4a53b029de2520938b02e945cdabd832c3c4fbbd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 21 Jul 2018 13:25:44 +0200 Subject: [PATCH] Mark WXSTRINGCAST and related macros as obsolete in a comment Make it clear that these macros are defined for compatibility only and shouldn't be used. See https://github.com/wxWidgets/wxWidgets/pull/857 --- include/wx/string.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/wx/string.h b/include/wx/string.h index 031cff5a60..c05eeac92e 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -90,8 +90,9 @@ namespace wxPrivate // macros // --------------------------------------------------------------------------- -// casts [unfortunately!] needed to call some broken functions which require -// "char *" instead of "const char *" +// These macros are not used by wxWidgets itself any longer and are only +// preserved for compatibility with the user code that might be still using +// them. Do _not_ use them in the new code, just use const_cast<> instead. #define WXSTRINGCAST (wxChar *)(const wxChar *) #define wxCSTRINGCAST (wxChar *)(const wxChar *) #define wxMBSTRINGCAST (char *)(const char *)