Fix XTI compilation in STL build.

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
This commit is contained in:
Vadim Zeitlin
2011-03-30 14:15:53 +00:00
parent 6c875e80e7
commit 44a0071224
4 changed files with 9 additions and 9 deletions

View File

@@ -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 ) \
@@ -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;
}

View File

@@ -931,14 +931,14 @@ void wxGenericPropertyAccessor::SetProperty(wxObject *object, const wxAny &value
{
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() );
}
// ----------------------------------------------------------------------------

View File

@@ -577,7 +577,7 @@ void wxObjectRuntimeReaderCallback::SetProperty(int objectID,
{
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,
@@ -599,7 +599,7 @@ void wxObjectRuntimeReaderCallback::SetPropertyAsObject(int objectID,
valo = dynvalo->GetSuperClassInstance();
}
classInfo->SetProperty( o, propertyInfo->GetName(),
classInfo->SetProperty( o, propertyInfo->GetName().c_str(),
valClassInfo->ObjectPtrToAny(valo) );
}
@@ -650,7 +650,7 @@ void wxObjectRuntimeReaderCallback::AddToPropertyCollection( int objectID,
{
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,
@@ -674,7 +674,7 @@ void wxObjectRuntimeReaderCallback::AddToPropertyCollectionAsObject(int objectID
valo = dynvalo->GetSuperClassInstance();
}
classInfo->AddToPropertyCollection( o, propertyInfo->GetName(),
classInfo->AddToPropertyCollection( o, propertyInfo->GetName().c_str(),
valClassInfo->ObjectPtrToAny(valo) );
}

View File

@@ -483,7 +483,7 @@ int wxObjectXmlReader::ReadComponent(wxXmlNode *node, wxObjectReaderCallback *ca
wxClassInfo* sinkClassInfo = GetObjectClassInfo( sinkOid );
callbacks->SetConnect( objectID, classInfo, pi, sinkClassInfo,
sinkClassInfo->FindHandlerInfo(handlerName), sinkOid );
sinkClassInfo->FindHandlerInfo(handlerName.c_str()), sinkOid );
}
else
{