aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlvaluetype.cpp')
-rw-r--r--src/qml/qml/qqmlvaluetype.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvaluetype.cpp b/src/qml/qml/qqmlvaluetype.cpp
index 6825e5f004..53b1ffccb5 100644
--- a/src/qml/qml/qqmlvaluetype.cpp
+++ b/src/qml/qml/qqmlvaluetype.cpp
@@ -518,7 +518,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);