Remove .values() call in foreach
authorAlbert Astals Cid <aacid@kde.org>
Sat, 23 Jun 2012 07:55:43 +0000 (09:55 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 27 Jun 2012 10:46:47 +0000 (12:46 +0200)
foreach already knows how to iterate over the values without the need to create an intermediate qlist

Change-Id: I4622a36fbdbf536a75f26b42e32488a77d078f02
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp

index a935179..3b61f5f 100644 (file)
@@ -2200,7 +2200,7 @@ static void shiftConstraints(const QList<QSimplexConstraint *> &constraints, qre
     for (int i = 0; i < constraints.count(); ++i) {
         QSimplexConstraint *c = constraints.at(i);
         qreal multiplier = 0;
-        foreach (qreal v, c->variables.values()) {
+        foreach (qreal v, c->variables) {
             multiplier += v;
         }
         c->constant += multiplier * amount;