aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-06-03 23:23:50 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-05 08:37:39 +0000
commit198b2f38657987bbd0186e18627da5d7c1ab614a (patch)
tree98ad26b3e0f3827421c9e0a7744ed0e8fc62226b /src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
parent3d12cf7bac7a06a94a60211e2f40017c3c3a7ba0 (diff)
Add missing QVector::reserve() calls
Change-Id: Iab7c9949941559b4773e5d4a0406dc58cfc70adb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultglyphnode_p.cpp')
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
index 0c4b2f9af9..9f1a44154c 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
@@ -414,7 +414,9 @@ void QSGTextMaskMaterial::populate(const QPointF &p,
{
Q_ASSERT(m_font.isValid());
QVector<QFixedPoint> fixedPointPositions;
- for (int i=0; i<glyphPositions.size(); ++i)
+ const int glyphPositionsSize = glyphPositions.size();
+ fixedPointPositions.reserve(glyphPositionsSize);
+ for (int i=0; i < glyphPositionsSize; ++i)
fixedPointPositions.append(QFixedPoint::fromPointF(glyphPositions.at(i)));
QTextureGlyphCache *cache = glyphCache();