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

@@ -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<prevChildCount; i++ )
delete m_children[i];
@@ -1664,9 +1665,8 @@ void wxFlagsProperty::OnSetValue()
if ( newFlags != m_oldValue )
{
// Set child modified states
unsigned int i;
const wxPGChoices& choices = m_choices;
for ( i = 0; i<GetItemCount(); i++ )
for ( unsigned int i = 0; i < GetItemCount(); i++ )
{
int flag;