Use pre-increment operator to increment iterator in the loop (propgrid sample).

When the return value is ignored, the ++it is never less efficient than the it++.
This commit is contained in:
Artur Wieczorek
2015-06-13 22:32:14 +02:00
parent dc3f451acb
commit 5d763571b0
2 changed files with 9 additions and 9 deletions

View File

@@ -296,7 +296,7 @@ wxArrayPGProperty GetPropertiesInRandomOrder( wxPropertyGridInterface* props, in
for ( it = props->GetIterator(iterationFlags);
!it.AtEnd();
it++ )
++it )
{
wxPGProperty* p = *it;
size_t randomNumber = rand();
@@ -440,7 +440,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
for ( it = page->GetIterator(wxPG_ITERATE_VISIBLE);
!it.AtEnd();
it++ )
++it )
{
wxPGProperty* p = *it;
RT_MSG(p->GetLabel());
@@ -962,7 +962,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
for ( it = page->GetIterator( wxPG_ITERATE_CATEGORIES );
!it.AtEnd();
it++ )
++it )
{
wxPGProperty* p = *it;
@@ -1003,7 +1003,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
for ( it = page->GetIterator( wxPG_ITERATE_CATEGORIES );
!it.AtEnd();
it++ )
++it )
{
wxPGProperty* p = *it;
@@ -1053,7 +1053,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
for ( it = page->GetIterator( wxPG_ITERATE_CATEGORIES );
!it.AtEnd();
it++ )
++it )
{
arr.Add((void*)*it);
}