From 552fba23862d2f2c88bd09202b8c1b5904830128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Mon, 8 Jun 2015 22:56:55 +0100 Subject: core: Add several QList::reserve() calls. Reduces reallocations. Change-Id: Ib63539fb690a80245d8fe81ff8468e79ffa8e57c Reviewed-by: Marc Mutz --- src/corelib/io/qurlquery.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/io/qurlquery.cpp') diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp index 91e6e21e20d..2b695a4f7b6 100644 --- a/src/corelib/io/qurlquery.cpp +++ b/src/corelib/io/qurlquery.cpp @@ -642,6 +642,7 @@ QList > QUrlQuery::queryItems(QUrl::ComponentFormattingO QList > result; Map::const_iterator it = d->itemList.constBegin(); Map::const_iterator end = d->itemList.constEnd(); + result.reserve(d->itemList.count()); for ( ; it != end; ++it) result << qMakePair(d->recodeToUser(it->first, encoding), d->recodeToUser(it->second, encoding)); -- cgit v1.2.3