summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2012-10-28 15:36:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-29 22:21:32 +0100
commitaf437047a2d849d19f8de01b5ecfb685f813d6a2 (patch)
tree50a8763dc6f74dd92fb0c9409b75531fa64b8694 /src/corelib/tools
parent3a333f2d92a44feba017c7951049e89adbbda686 (diff)
QMap - improve QMap stl-map ctor
We can insert directly on the most left-most Node. We always enforce an insert here (unlike the insert call), but that is not a problem since the keys in a std::map are unique. Change-Id: Ib409b90ffc57a5a43dab4a4b08d34f6fdabd057f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index e0b267ce20..d44a79473d 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -939,7 +939,7 @@ Q_OUTOFLINE_TEMPLATE QMap<Key, T>::QMap(const std::map<Key, T> &other)
typename std::map<Key,T>::const_iterator it = other.end();
while (it != other.begin()) {
--it;
- insert((*it).first, (*it).second);
+ d->createNode((*it).first, (*it).second, d->begin(), true); // insert on most left node.
}
}