From 664aaa1b60c5da28f684f6ab231625d59f661762 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Tue, 2 Aug 2011 17:21:56 +0200 Subject: [PATCH] ++ prefix for non-trivial data-types change suffix ++ to prefix ++ to speed up a little bit not-trivial data-types. discovered by cppcheck REVIEW: 102057 --- clientgroup.cpp | 2 +- clients/oxygen/oxygenexceptionlist.cpp | 2 +- effects/presentwindows/presentwindows.cpp | 2 +- effects/slidingpopups/slidingpopups.cpp | 6 +++--- libkwineffects/kwineffects.cpp | 6 +++--- useractions.cpp | 2 +- workspace.cpp | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/clientgroup.cpp b/clientgroup.cpp index f8604b60ed..abf6e6384d 100644 --- a/clientgroup.cpp +++ b/clientgroup.cpp @@ -270,7 +270,7 @@ void ClientGroup::setVisible(Client* c) void ClientGroup::updateStates(Client* main, Client* only) { - for (ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); i++) + for (ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); ++i) if ((*i) != main && (!only || (*i) == only)) { if ((*i)->isMinimized() != main->isMinimized()) { if (main->isMinimized()) diff --git a/clients/oxygen/oxygenexceptionlist.cpp b/clients/oxygen/oxygenexceptionlist.cpp index 652dda0c79..c7677bf413 100644 --- a/clients/oxygen/oxygenexceptionlist.cpp +++ b/clients/oxygen/oxygenexceptionlist.cpp @@ -65,7 +65,7 @@ namespace Oxygen // also add exceptions int index(0); - for( ExceptionList::const_iterator iter = constBegin(); iter != constEnd(); iter++, index++ ) + for( ExceptionList::const_iterator iter = constBegin(); iter != constEnd(); ++iter, index++ ) { KConfigGroup group( &config, exceptionGroupName( index ) ); diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index a0e830600c..0dd07448de 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -236,7 +236,7 @@ void PresentWindowsEffect::postPaintScreen() while (i != m_windowData.end()) { delete i.value().textFrame; delete i.value().iconFrame; - i++; + ++i; } m_windowData.clear(); diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index 34bdac4049..4ffd3e2c17 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -58,18 +58,18 @@ void SlidingPopupsEffect::reconfigure(ReconfigureFlags flags) QHash< const EffectWindow*, QTimeLine* >::iterator it = mAppearingWindows.begin(); while (it != mAppearingWindows.end()) { it.value()->setDuration(animationTime(mFadeInTime)); - it++; + ++it; } it = mDisappearingWindows.begin(); while (it != mDisappearingWindows.end()) { it.value()->setDuration(animationTime(mFadeOutTime)); - it++; + ++it; } QHash< const EffectWindow*, Data >::iterator wIt = mWindowsData.begin(); while (wIt != mWindowsData.end()) { wIt.value().fadeInDuration = mFadeInTime; wIt.value().fadeOutDuration = mFadeOutTime; - wIt++; + ++wIt; } } diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index e0c5538ceb..57e29db43a 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -847,7 +847,7 @@ void WindowMotionManager::calculate(int time) // Just skip it completely if the user wants no animation m_movingWindowsSet.clear(); QHash::iterator it = m_managedWindows.begin(); - for (; it != m_managedWindows.end(); it++) { + for (; it != m_managedWindows.end(); ++it) { WindowMotion *motion = &it.value(); motion->translation.finish(); motion->scale.finish(); @@ -855,7 +855,7 @@ void WindowMotionManager::calculate(int time) } QHash::iterator it = m_managedWindows.begin(); - for (; it != m_managedWindows.end(); it++) { + for (; it != m_managedWindows.end(); ++it) { WindowMotion *motion = &it.value(); EffectWindow *window = it.key(); int stopped = 0; @@ -904,7 +904,7 @@ void WindowMotionManager::calculate(int time) void WindowMotionManager::reset() { QHash::iterator it = m_managedWindows.begin(); - for (; it != m_managedWindows.end(); it++) { + for (; it != m_managedWindows.end(); ++it) { WindowMotion *motion = &it.value(); EffectWindow *window = it.key(); motion->translation.setTarget(window->pos()); diff --git a/useractions.cpp b/useractions.cpp index b6ee9a63e1..cb5e237ad6 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -424,7 +424,7 @@ void Workspace::groupTabPopupAboutToShow() return; add_tabs_popup->clear(); int index = 0; - for (QList::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); i++, index++) { + for (QList::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); ++i, index++) { if (!(*i)->contains(active_popup_client)) { QAction* action = add_tabs_popup->addAction((*i)->visible()->caption()); action->setData(index); diff --git a/workspace.cpp b/workspace.cpp index 25b766e162..6195639bbf 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -989,7 +989,7 @@ void Workspace::slotReconfigure() // If the new decoration doesn't supports tabs then ungroup clients if (!decorationSupportsClientGrouping()) { QList tmpGroups = clientGroups; // Prevent crashing - for (QList::const_iterator i = tmpGroups.constBegin(); i != tmpGroups.constEnd(); i++) + for (QList::const_iterator i = tmpGroups.constBegin(); i != tmpGroups.constEnd(); ++i) (*i)->removeAll(); } mgr->destroyPreviousPlugin();