summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-02-27 08:20:14 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-27 09:36:20 -0800
commitc70bf6b2bf4b01e01ecf86768906ddf631f18629 (patch)
treea774a0836fa63a7e49c04eaa22feb4ce402d710f /platform/default
parent73c5d5c00aa6e7c8a2702492b5074c2211edc94e (diff)
downloadqtlocation-mapboxgl-c70bf6b2bf4b01e01ecf86768906ddf631f18629.tar.gz
[core] Reserve vector size
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/bidi.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/default/bidi.cpp b/platform/default/bidi.cpp
index 64baddaa5b..08a02ee60f 100644
--- a/platform/default/bidi.cpp
+++ b/platform/default/bidi.cpp
@@ -74,6 +74,8 @@ std::vector<std::u16string> BiDi::applyLineBreaking(std::set<std::size_t> lineBr
mergeParagraphLineBreaks(lineBreakPoints);
std::vector<std::u16string> transformedLines;
+ transformedLines.reserve(lineBreakPoints.size());
+
std::size_t start = 0;
for (std::size_t lineBreakPoint : lineBreakPoints) {
transformedLines.push_back(getLine(start, lineBreakPoint));