diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index d75f2ce379..54d31b92ff 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -94,8 +94,7 @@ bool operator == (const wxArrayInt& array1, const wxArrayInt& array2) { if ( array1.size() != array2.size() ) return false; - size_t i; - for ( i=0; iGetCommonValueLabel(i)); } diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 47359af123..5dd583f29b 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -240,7 +240,7 @@ public: virtual ~wxPGHeaderCtrl() { - for (unsigned int i=0; iClearSelection(); wxDELETE(m_pPropGrid); - size_t i; - for ( i=0; iSetFont(font); // TODO: Need to do caption recacalculations for other pages as well. - unsigned int i; - for ( i=0; im_label == name ) return i; @@ -816,8 +813,7 @@ int wxPropertyGridManager::GetPageByState( const wxPropertyGridPageState* pState { wxASSERT( pState ); - size_t i; - for ( i=0; iGetStatePtr() ) return i; @@ -1060,8 +1056,7 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index, bool wxPropertyGridManager::IsAnyModified() const { - size_t i; - for ( i=0; iGetStatePtr()->m_anyModified ) return true; @@ -1687,8 +1682,7 @@ void wxPropertyGridManager::RecreateControls() wxPGProperty* wxPropertyGridManager::DoGetPropertyByName( const wxString& name ) const { - size_t i; - for ( i=0; iGetStatePtr(); wxPGProperty* p = pState->BaseGetPropertyByName(name); @@ -1862,9 +1856,8 @@ void wxPropertyGridManager::SetSplitterLeft( bool subProps, bool allPages ) dc.SetFont(m_pPropGrid->GetFont()); int highest = 0; - unsigned int i; - for ( i=0; iGetColumnFitWidth(dc, m_arrPages[i]->DoGetRoot(), 0, subProps ); maxW += m_pPropGrid->GetMarginWidth(); @@ -2118,8 +2111,7 @@ void wxPropertyGridManager::SetSplitterPosition( int pos, int splitterColumn ) wxASSERT_MSG( GetPageCount(), wxT("SetSplitterPosition() has no effect until pages have been added") ); - size_t i; - for ( i=0; iDoSetSplitterPosition( pos, splitterColumn, diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 79e95a72a2..22c8055eb3 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -1482,8 +1482,7 @@ void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags ) // value is if ( AreChildrenComponents() ) { - unsigned int i; - for ( i=0; iSetValue(value, NULL, flags|wxPG_SETVAL_FROM_PARENT); } } @@ -1894,8 +1893,7 @@ wxString wxPGProperty::GetFlagsAsString( FlagType flagsMask ) const int relevantFlags = m_flags & flagsMask & wxPG_STRING_STORED_FLAGS; FlagType a = 1; - unsigned int i = 0; - for ( i=0; i> %s.AdaptListToValue()"),GetBaseName().c_str()); - for ( i=0; im_arrIndex = i; } @@ -2457,9 +2450,7 @@ void wxPGProperty::FixIndicesOfChildren( unsigned int starthere ) // Returns (direct) child property with given name (or NULL if not found) wxPGProperty* wxPGProperty::GetPropertyByName( const wxString& name ) const { - size_t i; - - for ( i=0; im_name == name ) @@ -2613,10 +2604,9 @@ wxPGProperty* wxPGProperty::GetItemAtY( unsigned int y, void wxPGProperty::Empty() { - size_t i; if ( !HasFlag(wxPG_PROP_CHILDREN_ARE_COPIES) ) { - for ( i=0; ibegin(); } - for ( i=0; iGetCount(); i++ ) + for ( unsigned int i = 0; i < m_data->GetCount(); i++ ) { const wxPGChoiceEntry& entry = m_data->Item(i); if ( entry.HasText() && entry.GetText() == str ) @@ -3040,8 +3027,7 @@ int wxPGChoices::Index( int val ) const { if ( IsOk() ) { - unsigned int i; - for ( i=0; i< m_data->GetCount(); i++ ) + for ( unsigned int i = 0; i < m_data->GetCount(); i++ ) { const wxPGChoiceEntry& entry = m_data->Item(i); if ( entry.GetValue() == val ) @@ -3056,10 +3042,9 @@ int wxPGChoices::Index( int val ) const wxArrayString wxPGChoices::GetLabels() const { wxArrayString arr; - unsigned int i; if ( this && IsOk() ) - for ( i=0; i= 0 ) @@ -3096,8 +3080,7 @@ wxArrayInt wxPGChoices::GetIndicesForStrings( const wxArrayString& strings, if ( IsOk() ) { - unsigned int i; - for ( i=0; i< strings.size(); i++ ) + for ( size_t i = 0; i < strings.size(); i++ ) { const wxString& str = strings[i]; int index = Index(str); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 64faa5ed2b..a6dd1f1bf4 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -2267,10 +2267,9 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc, } // Splitters - unsigned int si; int sx = x; - for ( si = 0; si < colCount; si++ ) + for ( unsigned int si = 0; si < colCount; si++ ) { sx += colWidths[si]; dc.DrawLine( sx, y, sx, y2 ); diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 4693fd358c..def62f3aa2 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -339,9 +339,7 @@ void wxPropertyGridPageState::CalculateFontAndBitmapStuff( int WXUNUSED(vspacing VirtualHeightChanged(); // Recalculate caption text extents. - unsigned int i; - - for ( i=0;iGetChildCount(); i++ ) + for ( unsigned int i = 0; i GetChildCount(); i++ ) { wxPGProperty* p = pwc->Item(i); if ( !p->IsCategory() ) @@ -850,8 +847,7 @@ int wxPropertyGridPageState::GetColumnFullWidth( wxClientDC &dc, wxPGProperty *p int wxPropertyGridPageState::DoGetSplitterPosition( int splitterColumn ) const { int n = GetGrid()->GetMarginWidth(); - int i; - for ( i=0; i<=splitterColumn; i++ ) + for ( int i = 0; i <= splitterColumn; i++ ) n += m_colWidths[i]; return n; } @@ -1479,8 +1475,7 @@ wxVariant wxPropertyGridPageState::DoGetPropertyValues( const wxString& listname { wxASSERT( !pwc->HasFlag(wxPG_PROP_AGGREGATE) ); - size_t i; - for ( i=0; iGetChildCount(); i++ ) + for ( unsigned int i = 0; i < pwc->GetChildCount(); i++ ) { wxPGProperty* p = pwc->Item(i); if ( !p->GetChildCount() || p->HasFlag(wxPG_PROP_AGGREGATE) ) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 3fed651262..521070ae26 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -1486,7 +1486,6 @@ void wxFlagsProperty::Init() // // Generate children // - unsigned int i; unsigned int prevChildCount = m_children.size(); @@ -1512,6 +1511,8 @@ void wxFlagsProperty::Init() state->DoClearSelection(); } + unsigned int i; + // Delete old children for ( i=0; i