// (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<char *>(x)
// ----------------------------------------------------------------------------
// Miscellaneous functions
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()); }
{
void Init(const char *str)
{
- m_string = XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET);
+ m_string = XmStringCreateLtoR
+ (
+ const_cast<char *>(str),
+ const_cast<char *>(XmSTRING_DEFAULT_CHARSET)
+ );
}
public: