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++.
This commit is contained in:
@@ -2358,7 +2358,7 @@ void wxPGProperty::RemoveChild( wxPGProperty* p )
|
|||||||
wxArrayPGProperty::iterator it;
|
wxArrayPGProperty::iterator it;
|
||||||
wxArrayPGProperty& children = m_children;
|
wxArrayPGProperty& children = m_children;
|
||||||
|
|
||||||
for ( it=children.begin(); it != children.end(); it++ )
|
for ( it=children.begin(); it != children.end(); ++it )
|
||||||
{
|
{
|
||||||
if ( *it == p )
|
if ( *it == p )
|
||||||
{
|
{
|
||||||
|
@@ -908,7 +908,7 @@ bool wxPropertyGrid::AddToSelectionFromInputEvent( wxPGProperty* prop,
|
|||||||
|
|
||||||
for ( it = GetIterator(wxPG_ITERATE_VISIBLE, startFrom);
|
for ( it = GetIterator(wxPG_ITERATE_VISIBLE, startFrom);
|
||||||
!it.AtEnd();
|
!it.AtEnd();
|
||||||
it++ )
|
++it )
|
||||||
{
|
{
|
||||||
wxPGProperty* p = *it;
|
wxPGProperty* p = *it;
|
||||||
|
|
||||||
@@ -5602,7 +5602,7 @@ void wxPropertyGrid::ClearActionTriggers( int action )
|
|||||||
|
|
||||||
for ( it = m_actionTriggers.begin();
|
for ( it = m_actionTriggers.begin();
|
||||||
it != m_actionTriggers.end();
|
it != m_actionTriggers.end();
|
||||||
it++ )
|
++it )
|
||||||
{
|
{
|
||||||
if ( it->second == action )
|
if ( it->second == action )
|
||||||
{
|
{
|
||||||
|
@@ -883,7 +883,7 @@ const wxString& wxPropertyGrid::DoubleToString(wxString& target,
|
|||||||
bool isZero = true;
|
bool isZero = true;
|
||||||
wxString::const_iterator i = target.begin() + 1;
|
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(',') )
|
if ( *i != wxS('0') && *i != wxS('.') && *i != wxS(',') )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user