summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qcborstreamwriter.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2020-05-09 16:36:08 +0200
committerMarc Mutz <marc.mutz@kdab.com>2020-05-10 12:48:23 +0200
commitf490ac671267438d8a539f4639c9e987861924cf (patch)
treed4d108eaf6f614d701b589519e69faab20fa21ed /src/corelib/serialization/qcborstreamwriter.cpp
parent8ed88d8d14ae9aed41029afe8bf4a6c42678c6b5 (diff)
QXmlStreamReader: avoid double QHash lookups
Replace if (hash.contains(x)) { // lookup #1 ~~~ hash[x]; // lookup #2 with if (auto it = hash.find(x); it != hash.end()) { // lookup ~~~ *it; // no lookup halving the number of QHash lookups. The container is not shared, so there's no danger of a detach when going directly to the non-const function. Change-Id: Ifae409f98e0be972b31a24326ad548723831fda8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/serialization/qcborstreamwriter.cpp')
0 files changed, 0 insertions, 0 deletions