X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c33522fca7cddc441a316f5b9fb50d7685435ba..cba4e486a4f8ab05674bac6ed8c6bfa58ab25131:/include/wx/motif/private.h?ds=sidebyside diff --git a/include/wx/motif/private.h b/include/wx/motif/private.h index 89b3e70e2e..5b05c6e249 100644 --- a/include/wx/motif/private.h +++ b/include/wx/motif/private.h @@ -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: