Replace post-increment on iterators with pre-increment
This is a micro-optimization, as pre-increment is at least as efficient as post-increment and typically slightly more so because it doesn't need to make a copy of the iterator, and better conforms to the prevailing C++ style. Closes https://github.com/wxWidgets/wxWidgets/pull/655
This commit is contained in:
committed by
Vadim Zeitlin
parent
f83d16aa46
commit
f423b88ded
@@ -327,7 +327,7 @@ void wxNotificationMessageWindow::AddVisibleNotification(wxNotificationMessageWi
|
||||
{
|
||||
bool found = false;
|
||||
for ( wxVector<wxNotificationMessageWindow*>::iterator it = ms_visibleNotifications.begin();
|
||||
it != ms_visibleNotifications.end(); it++ )
|
||||
it != ms_visibleNotifications.end(); ++it )
|
||||
{
|
||||
if ( *it == notif )
|
||||
{
|
||||
@@ -345,7 +345,7 @@ void wxNotificationMessageWindow::AddVisibleNotification(wxNotificationMessageWi
|
||||
void wxNotificationMessageWindow::RemoveVisibleNotification(wxNotificationMessageWindow* notif)
|
||||
{
|
||||
for ( wxVector<wxNotificationMessageWindow*>::iterator it = ms_visibleNotifications.begin();
|
||||
it != ms_visibleNotifications.end(); it++ )
|
||||
it != ms_visibleNotifications.end(); ++it )
|
||||
{
|
||||
if ( *it == notif )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user