diff --git a/include/wx/propgrid/propgriddefs.h b/include/wx/propgrid/propgriddefs.h index 5dcc6cd973..868f355357 100644 --- a/include/wx/propgrid/propgriddefs.h +++ b/include/wx/propgrid/propgriddefs.h @@ -547,7 +547,7 @@ expdecl classname& classname##RefFromVariant( wxVariant& variant ) \ wxString::Format(wxS("Variant type should have been '%s'") \ wxS("instead of '%s'"), \ wxS(#classname), \ - variant.GetType().c_str())); \ + variant.GetType())); \ classname##VariantData *data = \ (classname##VariantData*) variant.GetData(); \ return data->GetValue();\ @@ -558,7 +558,7 @@ expdecl const classname& classname##RefFromVariant( const wxVariant& variant ) \ wxString::Format(wxS("Variant type should have been '%s'") \ wxS("instead of '%s'"), \ wxS(#classname), \ - variant.GetType().c_str())); \ + variant.GetType())); \ classname##VariantData *data = \ (classname##VariantData*) variant.GetData(); \ return data->GetValue();\ diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index f65cc49918..5a9af11668 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1085,7 +1085,7 @@ int wxSystemColourProperty::ColToInd( const wxColour& colour ) const if ( colour == GetColour(ind) ) { /*wxLogDebug(wxS("%s(%s): Index %i for ( getcolour(%i,%i,%i), colour(%i,%i,%i))"), - GetClassName(),GetLabel().c_str(), + GetClassName(),GetLabel(), (int)i,(int)GetColour(ind).Red(),(int)GetColour(ind).Green(),(int)GetColour(ind).Blue(), (int)colour.Red(),(int)colour.Green(),(int)colour.Blue());*/ return ind; diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 0aa8255102..5f46ee783f 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -337,7 +337,7 @@ bool wxPGDefaultRenderer::Render( wxDC& dc, const wxRect& rect, { wxString unitsString = property->GetAttribute(wxPG_ATTR_UNITS, wxEmptyString); if ( !unitsString.empty() ) - text = wxString::Format(wxS("%s %s"), text.c_str(), unitsString.c_str() ); + text = wxString::Format(wxS("%s %s"), text, unitsString ); } } @@ -919,7 +919,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column, wxASSERT_MSG( cell.GetData(), wxString::Format(wxS("Invalid cell for property %s"), - GetName().c_str()) ); + GetName()) ); // We need to return customized cell object. if (pCell) @@ -1470,7 +1470,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags ) wxVariant newValue; AdaptListToValue(value, &newValue); value = newValue; - //wxLogDebug(wxS(">> %s.SetValue() adapted list value to type '%s'"),GetName().c_str(),value.GetType().c_str()); + //wxLogDebug(wxS(">> %s.SetValue() adapted list value to type '%s'"),GetName(),value.GetType()); } if ( HasFlag( wxPG_PROP_AGGREGATE) ) @@ -1486,7 +1486,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags ) wxVariantList::iterator node; unsigned int i = 0; - //wxLogDebug(wxS(">> %s.SetValue() pList parsing"),GetName().c_str()); + //wxLogDebug(wxS(">> %s.SetValue() pList parsing"),GetName()); // Children in list can be in any order, but we will give hint to // GetPropertyByNameWH(). This optimizes for full list parsing. @@ -1496,7 +1496,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags ) wxPGProperty* child = GetPropertyByNameWH(childValue.GetName(), i); if ( child ) { - //wxLogDebug(wxS("%i: child = %s, childValue.GetType()=%s"),i,child->GetBaseName().c_str(),childValue.GetType().c_str()); + //wxLogDebug(wxS("%i: child = %s, childValue.GetType()=%s"),i,child->GetBaseName(),childValue.GetType()); if ( childValue.IsType(wxPG_VARIANT_TYPE_LIST) ) { if ( child->HasFlag(wxPG_PROP_AGGREGATE) && !(flags & wxPG_SETVAL_AGGREGATED) ) @@ -1966,7 +1966,7 @@ double wxPGProperty::GetAttributeAsDouble( const wxString& name, double defVal ) wxVariant wxPGProperty::GetAttributesAsList() const { wxVariantList tempList; - wxVariant v( tempList, wxString::Format(wxS("@%s@attr"),m_name.c_str()) ); + wxVariant v( tempList, wxString::Format(wxS("@%s@attr"),m_name) ); wxPGAttributeStorage::const_iterator it = m_attributes.StartIteration(); wxVariant variant; @@ -2496,7 +2496,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const unsigned int n = 0; wxVariant childValue = list[n]; - //wxLogDebug(wxS(">> %s.AdaptListToValue()"),GetBaseName().c_str()); + //wxLogDebug(wxS(">> %s.AdaptListToValue()"),GetBaseName()); for ( unsigned int i = 0; i < GetChildCount(); i++ ) { @@ -2504,7 +2504,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const if ( childValue.GetName() == child->GetBaseName() ) { - //wxLogDebug(wxS(" %s(n=%i), %s"),childValue.GetName().c_str(),n,childValue.GetType().c_str()); + //wxLogDebug(wxS(" %s(n=%i), %s"),childValue.GetName(),n,childValue.GetType()); if ( childValue.IsType(wxPG_VARIANT_TYPE_LIST) ) { @@ -2678,11 +2678,11 @@ wxPGProperty* wxPGProperty::GetItemAtY( unsigned int y, /* if ( current ) { - wxLogDebug(wxS("%s::GetItemAtY(%i) -> %s"),this->GetLabel().c_str(),y,current->GetLabel().c_str()); + wxLogDebug(wxS("%s::GetItemAtY(%i) -> %s"),this->GetLabel(),y,current->GetLabel()); } else { - wxLogDebug(wxS("%s::GetItemAtY(%i) -> NULL"),this->GetLabel().c_str(),y); + wxLogDebug(wxS("%s::GetItemAtY(%i) -> NULL"),this->GetLabel(),y); } */ diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 9ea2aeba5f..b910fe5d5e 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -2095,8 +2095,8 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc, /* wxLogDebug(wxS(" -> DoDrawItems(\"%s\" -> \"%s\"") wxS(" %i -> %i height=%i (ch=%i), itemsRect = 0x%lX %i,%i %ix%i)"), - firstItem->GetLabel().c_str(), - lastItem->GetLabel().c_str(), + firstItem->GetLabel(), + lastItem->GetLabel(), firstItemTopY, lastItemBottomY, (int)(lastItemBottomY - firstItemTopY), (int)m_height, @@ -4021,8 +4021,8 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) /* if (p) { - wxLogDebug(wxS("SelectProperty( %s (%s[%i]) )"),p->GetLabel().c_str(), - p->m_parent->GetLabel().c_str(),p->GetIndexInParent()); + wxLogDebug(wxS("SelectProperty( %s (%s[%i]) )"),p->GetLabel(), + p->m_parent->GetLabel(),p->GetIndexInParent()); } else { @@ -6438,13 +6438,13 @@ wxPGProperty* wxPropertyGridPopulator::Add( const wxString& propClass, if ( parent->HasFlag(wxPG_PROP_AGGREGATE) ) { - ProcessError(wxString::Format(wxS("new children cannot be added to '%s'"),parent->GetName().c_str())); + ProcessError(wxString::Format(wxS("new children cannot be added to '%s'"),parent->GetName())); return NULL; } if ( !classInfo || !classInfo->IsKindOf(wxCLASSINFO(wxPGProperty)) ) { - ProcessError(wxString::Format(wxS("'%s' is not valid property class"),propClass.c_str())); + ProcessError(wxString::Format(wxS("'%s' is not valid property class"),propClass)); return NULL; } @@ -6487,7 +6487,7 @@ wxPGChoices wxPropertyGridPopulator::ParseChoices( const wxString& choicesString wxString ids = choicesString.substr(1); wxPGHashMapS2P::iterator it = m_dictIdChoices.find(ids); if ( it == m_dictIdChoices.end() ) - ProcessError(wxString::Format(wxS("No choices defined for id '%s'"),ids.c_str())); + ProcessError(wxString::Format(wxS("No choices defined for id '%s'"),ids)); else choices.AssignData((wxPGChoicesData*)it->second); } @@ -6528,7 +6528,7 @@ wxPGChoices wxPropertyGridPopulator::ParseChoices( const wxString& choicesString choices.Add(label, l); } labelValid = false; - //wxLogDebug(wxS("%s, %s"),label.c_str(),value.c_str()); + //wxLogDebug(wxS("%s, %s"),label,value); value.clear(); label.clear(); state = 1; @@ -6645,7 +6645,7 @@ bool wxPropertyGridPopulator::AddAttribute( const wxString& name, } else { - ProcessError(wxString::Format(wxS("Invalid attribute type '%s'"),type.c_str())); + ProcessError(wxString::Format(wxS("Invalid attribute type '%s'"),type)); return false; } } @@ -6659,7 +6659,7 @@ bool wxPropertyGridPopulator::AddAttribute( const wxString& name, void wxPropertyGridPopulator::ProcessError( const wxString& msg ) { - wxLogError(_("Error in resource: %s"),msg.c_str()); + wxLogError(_("Error in resource: %s"),msg); } // ----------------------------------------------------------------------- diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp index 2985d67f75..307753986e 100644 --- a/src/propgrid/propgridiface.cpp +++ b/src/propgrid/propgridiface.cpp @@ -399,7 +399,7 @@ void wxPGTypeOperationFailed( const wxPGProperty* p, { wxASSERT( p != NULL ); wxLogError( _("Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT \"%s\"."), - op.c_str(), p->GetLabel().c_str(), p->GetValue().GetType().c_str(), typestr.c_str() ); + op, p->GetLabel(), p->GetValue().GetType(), typestr ); } // ----------------------------------------------------------------------- @@ -434,7 +434,7 @@ void wxPropertyGridInterface::SetValidationFailureBehavior( int vfbFlags ) wxPGProperty* wxPropertyGridInterface::GetPropertyByNameA( const wxString& name ) const { wxPGProperty* p = GetPropertyByName(name); - wxASSERT_MSG(p,wxString::Format(wxS("no property with name '%s'"),name.c_str())); + wxASSERT_MSG(p,wxString::Format(wxS("no property with name '%s'"),name)); return p; } diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index be18422604..e87a34a115 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -1599,7 +1599,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx wxStrcmp(current->GetType(), p->GetValue().GetType()) == 0, wxString::Format( wxS("setting value of property \"%s\" from variant"), - p->GetName().c_str()) + p->GetName()) ); p->SetValue(*current); diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 4fbd16c3d1..cdc0557851 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -385,14 +385,14 @@ bool NumericValidation( const wxPGProperty* property, if ( !maxOk ) msg = wxString::Format( _("Value must be %s or higher."), - smin.c_str()); + smin); else { wxVariant vmax = WXVARIANT(max); wxString smax = property->ValueToString(vmax); msg = wxString::Format( _("Value must be between %s and %s."), - smin.c_str(), smax.c_str()); + smin, smax); } pValidationInfo->SetFailureMessage(msg); } @@ -416,14 +416,14 @@ bool NumericValidation( const wxPGProperty* property, if ( !minOk ) msg = wxString::Format( _("Value must be %s or less."), - smax.c_str()); + smax); else { wxVariant vmin = WXVARIANT(min); wxString smin = property->ValueToString(vmin); msg = wxString::Format( _("Value must be between %s and %s."), - smin.c_str(), smax.c_str()); + smin, smax); } pValidationInfo->SetFailureMessage(msg); } @@ -499,14 +499,14 @@ bool NumericValidation( const wxPGProperty* property, if ( !maxOk ) msg = wxString::Format( _("Value must be %s or higher."), - smin.c_str()); + smin); else { wxVariant vmax = WXVARIANT(max); wxString smax = property->ValueToString(vmax); msg = wxString::Format( _("Value must be between %s and %s."), - smin.c_str(), smax.c_str()); + smin, smax); } pValidationInfo->SetFailureMessage(msg); } @@ -530,14 +530,14 @@ bool NumericValidation( const wxPGProperty* property, if ( !minOk ) msg = wxString::Format( _("Value must be %s or less."), - smax.c_str()); + smax); else { wxVariant vmin = WXVARIANT(min); wxString smin = property->ValueToString(vmin); msg = wxString::Format( _("Value must be between %s and %s."), - smin.c_str(), smax.c_str()); + smin, smax); } pValidationInfo->SetFailureMessage(msg); } @@ -923,7 +923,7 @@ const wxString& wxPropertyGrid::DoubleToString(wxString& target, *precTemplate << wxS('f'); } - target.Printf( precTemplate->c_str(), value ); + target.Printf( *precTemplate, value ); } else { @@ -1131,7 +1131,7 @@ wxString wxBoolProperty::ValueToString( wxVariant& value, else notFmt = wxS("Not %s"); - return wxString::Format(notFmt.c_str(), m_label.c_str()); + return wxString::Format(notFmt, m_label); } }