Reduce the scope of variables using to indexing single loop only.

And adjust their types if necessary (to have uniform types in the test expression).
This commit is contained in:
Artur Wieczorek
2015-05-28 19:39:14 +02:00
parent 6908275ed2
commit 0508087ce2
7 changed files with 34 additions and 68 deletions

View File

@@ -339,9 +339,7 @@ void wxPropertyGridPageState::CalculateFontAndBitmapStuff( int WXUNUSED(vspacing
VirtualHeightChanged();
// Recalculate caption text extents.
unsigned int i;
for ( i=0;i<m_regularArray.GetChildCount();i++ )
for ( unsigned int i = 0; i < m_regularArray.GetChildCount();i++ )
{
wxPGProperty* p =m_regularArray.Item(i);
@@ -788,11 +786,10 @@ int wxPropertyGridPageState::GetColumnFitWidth(wxClientDC& dc,
bool subProps) const
{
wxPropertyGrid* pg = m_pPropGrid;
size_t i;
int maxW = 0;
int w, h;
for ( i=0; i<pwc->GetChildCount(); i++ )
for ( unsigned int i = 0; i <pwc->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; i<pwc->GetChildCount(); i++ )
for ( unsigned int i = 0; i < pwc->GetChildCount(); i++ )
{
wxPGProperty* p = pwc->Item(i);
if ( !p->GetChildCount() || p->HasFlag(wxPG_PROP_AGGREGATE) )