summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Martins <sergio.martins@kdab.com>2015-06-08 14:04:48 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-06-08 14:30:23 +0000
commitcaf00c9e340dac6a525c61927c62c5f9a928812f (patch)
tree39b18d4e1c380e4aa96022ef88067dc22ed02a73
parent926b898a9ca0778b30a5cb3eb01f826754b08f8b (diff)
downloadqtsvg-caf00c9e340dac6a525c61927c62c5f9a928812f.tar.gz
Add a couple of QList::reserve() calls.
Change-Id: Ife2fa97ef8395753523aba96757fac8885a75980 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
-rw-r--r--src/svg/qsvghandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 6767cff..b531499 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2282,10 +2282,12 @@ static bool parseAnimateColorNode(QSvgNode *parent,
QColor startColor, endColor;
resolveColor(fromStr, startColor, handler);
resolveColor(toStr, endColor, handler);
+ colors.reserve(2);
colors.append(startColor);
colors.append(endColor);
} else {
QStringList str = valuesStr.split(QLatin1Char(';'));
+ colors.reserve(str.count());
QStringList::const_iterator itr;
for (itr = str.constBegin(); itr != str.constEnd(); ++itr) {
QColor color;