diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-06 16:57:33 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-08 11:35:42 +0000 |
commit | 52d91eeea4f49d36c18efd39e12f2634992cb63b (patch) | |
tree | 59cd35f687bcf5b4d02ce6ce24fc8362fa58a171 /src/qml/qml/qqmlvaluetype.cpp | |
parent | 1790d374718308dc530b14eb004d1504baa2a5c6 (diff) |
Add 28 QList::reserve() calls
Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/qml/qml/qqmlvaluetype.cpp')
-rw-r--r-- | src/qml/qml/qqmlvaluetype.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvaluetype.cpp b/src/qml/qml/qqmlvaluetype.cpp index 341ddf802d..cc4a9bebc5 100644 --- a/src/qml/qml/qqmlvaluetype.cpp +++ b/src/qml/qml/qqmlvaluetype.cpp @@ -478,7 +478,9 @@ void QQmlEasingValueType::setBezierCurve(const QVariantList &customCurveVariant) if ((variantList.count() % 6) == 0) { bool allRealsOk = true; QList<qreal> reals; - for (int i = 0; i < variantList.count(); i++) { + const int variantListCount = variantList.count(); + reals.reserve(variantListCount); + for (int i = 0; i < variantListCount; i++) { bool ok; const qreal real = variantList.at(i).toReal(&ok); reals.append(real); |