added wxMOTIF_STR() macro casting away string literal constness for use with Motif functions taking char *; use it when needed to suppress warnings about string literals being treated as non-const

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-13 16:49:07 +00:00
parent 3f62badb5f
commit f1db433a3b
7 changed files with 37 additions and 32 deletions

View File

@@ -38,6 +38,12 @@ class WXDLLEXPORT wxColour;
#define wxCHECK_LESSTIF() ( __WXLESSTIF__ )
// some compilers (e.g. Sun CC) give warnings when treating string literals as
// (non const) "char *" but many Motif functions take "char *" parameters which
// are really "const char *" so use this macro to suppress the warnings when we
// know it's ok
#define wxMOTIF_STR(x) wx_const_cast(char *, x)
// ----------------------------------------------------------------------------
// Miscellaneous functions
// ----------------------------------------------------------------------------