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:
@@ -1162,7 +1162,7 @@ void FormMain::PopulateWithStandardItems ()
|
||||
|
||||
for ( it = pg->GetGrid()->GetIterator();
|
||||
!it.AtEnd();
|
||||
it++ )
|
||||
++it )
|
||||
{
|
||||
wxPGProperty* p = *it;
|
||||
if ( p->IsCategory() )
|
||||
@@ -2370,7 +2370,7 @@ void FormMain::OnIterate1Click( wxCommandEvent& WXUNUSED(event) )
|
||||
for ( it = m_pPropGridManager->GetCurrentPage()->
|
||||
GetIterator();
|
||||
!it.AtEnd();
|
||||
it++ )
|
||||
++it )
|
||||
{
|
||||
wxPGProperty* p = *it;
|
||||
int res = IterateMessage( p );
|
||||
@@ -2387,7 +2387,7 @@ void FormMain::OnIterate2Click( wxCommandEvent& WXUNUSED(event) )
|
||||
for ( it = m_pPropGridManager->GetCurrentPage()->
|
||||
GetIterator( wxPG_ITERATE_VISIBLE );
|
||||
!it.AtEnd();
|
||||
it++ )
|
||||
++it )
|
||||
{
|
||||
wxPGProperty* p = *it;
|
||||
|
||||
@@ -2424,7 +2424,7 @@ void FormMain::OnIterate4Click( wxCommandEvent& WXUNUSED(event) )
|
||||
for ( it = m_pPropGridManager->GetCurrentPage()->
|
||||
GetIterator( wxPG_ITERATE_CATEGORIES );
|
||||
!it.AtEnd();
|
||||
it++ )
|
||||
++it )
|
||||
{
|
||||
wxPGProperty* p = *it;
|
||||
|
||||
|
Reference in New Issue
Block a user