Use explicit c_str() calls in XTI code as implicit conversion to "const char
*" doesn't exist in STL build.
This fixes compilation problems when wxUSE_EXTENDED_RTTI && wxUSE_STL.
Closes #13087.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67342
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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 ) \
{
flag = array[i];
int ivalue;
- if ( edata->HasEnumMemberValue( flag, &ivalue ) )
+ if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) )
{
data.m_data |= ivalue;
}
{
wxDynamicObject* dynobj = wx_dynamic_cast(wxDynamicObject*, object);
wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
- dynobj->SetProperty(m_propertyName, value );
+ dynobj->SetProperty(m_propertyName.c_str(), value );
}
void wxGenericPropertyAccessor::GetProperty(const wxObject *object, wxAny& value) const
{
const wxDynamicObject* dynobj = wx_dynamic_cast( const wxDynamicObject * , object );
wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
- value = dynobj->GetProperty( m_propertyName );
+ value = dynobj->GetProperty( m_propertyName.c_str() );
}
// ----------------------------------------------------------------------------
{
wxObject *o;
o = m_data->GetObject(objectID);
- classInfo->SetProperty( o, propertyInfo->GetName(), value );
+ classInfo->SetProperty( o, propertyInfo->GetName().c_str(), value );
}
void wxObjectRuntimeReaderCallback::SetPropertyAsObject(int objectID,
valo = dynvalo->GetSuperClassInstance();
}
- classInfo->SetProperty( o, propertyInfo->GetName(),
+ classInfo->SetProperty( o, propertyInfo->GetName().c_str(),
valClassInfo->ObjectPtrToAny(valo) );
}
{
wxObject *o;
o = m_data->GetObject(objectID);
- classInfo->AddToPropertyCollection( o, propertyInfo->GetName(), value );
+ classInfo->AddToPropertyCollection( o, propertyInfo->GetName().c_str(), value );
}
void wxObjectRuntimeReaderCallback::AddToPropertyCollectionAsObject(int objectID,
valo = dynvalo->GetSuperClassInstance();
}
- classInfo->AddToPropertyCollection( o, propertyInfo->GetName(),
+ classInfo->AddToPropertyCollection( o, propertyInfo->GetName().c_str(),
valClassInfo->ObjectPtrToAny(valo) );
}
wxClassInfo* sinkClassInfo = GetObjectClassInfo( sinkOid );
callbacks->SetConnect( objectID, classInfo, pi, sinkClassInfo,
- sinkClassInfo->FindHandlerInfo(handlerName), sinkOid );
+ sinkClassInfo->FindHandlerInfo(handlerName.c_str()), sinkOid );
}
else
{