From 551fe9528a2c08886a48a8e13234a4f2228f7b4c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 19 Mar 2007 00:53:06 +0000 Subject: [PATCH] added wxXmString ctor from wxCStrData to fix compilation errors after c_str() changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/motif/private.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/wx/motif/private.h b/include/wx/motif/private.h index 4f87d491ee..c19974fbe4 100644 --- a/include/wx/motif/private.h +++ b/include/wx/motif/private.h @@ -131,16 +131,25 @@ XmString wxStringToXmString( const char* string ); // cleaning up automatically) class wxXmString { + void Init(const char *str) + { + m_string = XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET); + } + public: wxXmString(const char* str) { - m_string = XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET); + Init(str); } wxXmString(const wxString& str) { - m_string = XmStringCreateLtoR((char *)str.mb_str(), - XmSTRING_DEFAULT_CHARSET); + Init(str.mb_str()); + } + + wxXmString(const wxCStrData& str) + { + Init(str); } // just to avoid calling XmStringFree() -- 2.45.2