summaryrefslogtreecommitdiff
path: root/src/plugins/diffeditor
diff options
context:
space:
mode:
authorMontel Laurent <laurent.montel@kdab.com>2017-04-14 10:39:44 +0200
committerLaurent Montel <laurent.montel@kdab.com>2017-04-14 13:18:17 +0000
commitf976dc96fd9267bd51bde31ebeec8bdeb21d3fc8 (patch)
tree8337013cfbfe6f0d24258a9ce6ca758e01e39817 /src/plugins/diffeditor
parentf18ae4ff6f82300804a6af3bc67a3286b1e58178 (diff)
downloadqt-creator-f976dc96fd9267bd51bde31ebeec8bdeb21d3fc8.tar.gz
Reserve some elements
Change-Id: Iceef4e9a6f213a747045db3b06a5608d77652f98 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/diffeditor')
-rw-r--r--src/plugins/diffeditor/differ.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/diffeditor/differ.cpp b/src/plugins/diffeditor/differ.cpp
index a99b14a127..1e452a7d46 100644
--- a/src/plugins/diffeditor/differ.cpp
+++ b/src/plugins/diffeditor/differ.cpp
@@ -89,6 +89,7 @@ static QList<Diff> decode(const QList<Diff> &diffList,
const QStringList &lines)
{
QList<Diff> newDiffList;
+ newDiffList.reserve(diffList.count());
for (int i = 0; i < diffList.count(); i++) {
Diff diff = diffList.at(i);
QString text;