From 1d9c1b35fd243f76455b6754cd0516c4ebf769f9 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 7 Jun 2015 23:05:42 +0200 Subject: [PATCH] Use pre-increment operator to increment iterator in the loop. When the return value is ignored, the ++it is never less efficient than the it++. --- src/propgrid/property.cpp | 2 +- src/propgrid/propgrid.cpp | 4 ++-- src/propgrid/props.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 0b7351a4aa..390aa675ee 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -2358,7 +2358,7 @@ void wxPGProperty::RemoveChild( wxPGProperty* p ) wxArrayPGProperty::iterator it; wxArrayPGProperty& children = m_children; - for ( it=children.begin(); it != children.end(); it++ ) + for ( it=children.begin(); it != children.end(); ++it ) { if ( *it == p ) { diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index fba42329db..5dd01d5e7f 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -908,7 +908,7 @@ bool wxPropertyGrid::AddToSelectionFromInputEvent( wxPGProperty* prop, for ( it = GetIterator(wxPG_ITERATE_VISIBLE, startFrom); !it.AtEnd(); - it++ ) + ++it ) { wxPGProperty* p = *it; @@ -5602,7 +5602,7 @@ void wxPropertyGrid::ClearActionTriggers( int action ) for ( it = m_actionTriggers.begin(); it != m_actionTriggers.end(); - it++ ) + ++it ) { if ( it->second == action ) { diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 35e3656ca6..e9d1a189f7 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -883,7 +883,7 @@ const wxString& wxPropertyGrid::DoubleToString(wxString& target, bool isZero = true; wxString::const_iterator i = target.begin() + 1; - for ( ; i != target.end(); i++ ) + for ( ; i != target.end(); ++i ) { if ( *i != wxS('0') && *i != wxS('.') && *i != wxS(',') ) {