diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-03 23:23:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-05 08:37:39 +0000 |
commit | 198b2f38657987bbd0186e18627da5d7c1ab614a (patch) | |
tree | 98ad26b3e0f3827421c9e0a7744ed0e8fc62226b /src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | |
parent | 3d12cf7bac7a06a94a60211e2f40017c3c3a7ba0 (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.cpp | 4 |
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(); |