X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2804f77d88eb478f85a281b19d87e38cd96e0d0c..11e3c6ef36393fb5863ea2f9601d8facd73acb12:/include/wx/motif/private.h diff --git a/include/wx/motif/private.h b/include/wx/motif/private.h index 871497df94..5b05c6e249 100644 --- a/include/wx/motif/private.h +++ b/include/wx/motif/private.h @@ -44,7 +44,7 @@ class WXDLLIMPEXP_FWD_CORE wxColour; // (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) +#define wxMOTIF_STR(x) const_cast(x) // ---------------------------------------------------------------------------- // Miscellaneous functions @@ -130,7 +130,7 @@ extern XColor itemColors[5] ; wxString wxXmStringToString( const XmString& xmString ); XmString wxStringToXmString( const char* string ); -inline XmString wxStringToXmString( const wxCharBuffer& string ) +inline XmString wxStringToXmString( const wxScopedCharBuffer& string ) { return wxStringToXmString(string.data()); } inline XmString wxStringToXmString( const wxString& string ) { return wxStringToXmString((const char*)string.mb_str()); } @@ -141,7 +141,11 @@ class wxXmString { void Init(const char *str) { - m_string = XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET); + m_string = XmStringCreateLtoR + ( + const_cast(str), + const_cast(XmSTRING_DEFAULT_CHARSET) + ); } public: