aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquicksmoothedanimation.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-02-23 13:45:44 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-02-26 15:13:40 +0000
commit3b5447661a2c9b4bbced202e116a7edeaaf9a065 (patch)
treeff7486e826942ac5339135913521bb28cf5ceb37 /src/quick/util/qquicksmoothedanimation.cpp
parent5163c11952a39458dd6d7ba10391c2b39ccdf86a (diff)
QtQuick: Micro-optimize iterator loops.
Avoid repeated instantiation of end() in loops, use variable instead. Change-Id: I6ab1fe2b82406d5ee91710a0333587ffb82c04d4 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/quick/util/qquicksmoothedanimation.cpp')
-rw-r--r--src/quick/util/qquicksmoothedanimation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/util/qquicksmoothedanimation.cpp b/src/quick/util/qquicksmoothedanimation.cpp
index 55011f5a46..71dacfcb1d 100644
--- a/src/quick/util/qquicksmoothedanimation.cpp
+++ b/src/quick/util/qquicksmoothedanimation.cpp
@@ -378,11 +378,11 @@ QQuickSmoothedAnimationPrivate::QQuickSmoothedAnimationPrivate()
QQuickSmoothedAnimationPrivate::~QQuickSmoothedAnimationPrivate()
{
+ typedef QHash<QQmlProperty, QSmoothedAnimation* >::iterator ActiveAnimationsHashIt;
+
delete anim;
- QHash<QQmlProperty, QSmoothedAnimation* >::iterator it;
- for (it = activeAnimations.begin(); it != activeAnimations.end(); ++it) {
+ for (ActiveAnimationsHashIt it = activeAnimations.begin(), end = activeAnimations.end(); it != end; ++it)
it.value()->clearTemplate();
- }
}
void QQuickSmoothedAnimationPrivate::updateRunningAnimations()