X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c294641fd54a4be9777053e149d847cbb90d529e..d642db66a5efc82d374b813022c72ba88bc50839:/include/wx/xtitypes.h diff --git a/include/wx/xtitypes.h b/include/wx/xtitypes.h index bbf9a69d03..d3fd1432f8 100644 --- a/include/wx/xtitypes.h +++ b/include/wx/xtitypes.h @@ -88,7 +88,7 @@ private: wxEnumData s_enumData##e( s_enumDataMembers##e ); \ wxEnumData *wxGetEnumData(e) { return &s_enumData##e; } \ template<> void wxStringReadValue(const wxString& s, e &data ) \ - { data = (e) s_enumData##e.GetEnumMemberValue(s); } \ + { data = (e) s_enumData##e.GetEnumMemberValue(s.c_str()); } \ template<> void wxStringWriteValue(wxString &s, const e &data ) \ { s = s_enumData##e.GetEnumMemberName((int)data); } \ void FromLong##e( long data, wxAny& result ) \ @@ -147,7 +147,7 @@ void wxSetFromString(const wxString &s, wxBitset &data ) { flag = array[i]; int ivalue; - if ( edata->HasEnumMemberValue( flag, &ivalue ) ) + if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) ) { data.set( (e) ivalue ); } @@ -202,7 +202,7 @@ void wxFlagsFromString(const wxString &s, e &data ) { flag = array[i]; int ivalue; - if ( edata->HasEnumMemberValue( flag, &ivalue ) ) + if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) ) { data.m_data |= ivalue; } @@ -236,7 +236,7 @@ void wxFlagsToString( wxString &s, const e& data ) #define wxBEGIN_FLAGS( e ) \ wxEnumMemberData s_enumDataMembers##e[] = { -#define wxFLAGS_MEMBER( v ) { wxT(#v), v }, +#define wxFLAGS_MEMBER( v ) { wxT(#v), static_cast(v) }, #define wxEND_FLAGS( e ) \ { NULL, 0 } }; \ @@ -355,7 +355,7 @@ public: if ( m_toString ) (*m_toString)( data, result ); else - wxLogError( wxGetTranslation(_T("String conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("String conversions not supported")) ); } // convert a string into a wxAny holding the corresponding data in this type @@ -364,7 +364,7 @@ public: if( m_fromString ) (*m_fromString)( data, result ); else - wxLogError( wxGetTranslation(_T("String conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("String conversions not supported")) ); } // statics: @@ -428,7 +428,7 @@ public: if( m_toLong ) (*m_toLong)( data, result ); else - wxLogError( wxGetTranslation(_T("Long Conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) ); } // convert a long into a wxAny holding the corresponding data in this type @@ -437,7 +437,7 @@ public: if( m_fromLong ) (*m_fromLong)( data, result ); else - wxLogError( wxGetTranslation(_T("Long Conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) ); } private: