summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qcoffpeparser.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2021-11-16 16:38:14 +0100
committerMarc Mutz <marc.mutz@qt.io>2021-11-20 02:38:40 +0100
commit2fbe460245f88ea5929e4cadd1bfdf43dacce224 (patch)
tree73df7e8571b14fc42fce41133534da2700e1d9bf /src/corelib/plugin/qcoffpeparser.cpp
parent07034b765e8da97b5ab640d8e0efbc72f00342a2 (diff)
QAndroidActivityResultReceiver: avoid double(triple)-lookup
The code used the if (!contains()) { insert() } anti-pattern, necessitated by Qt's deviation from the STL of allowing insert() to overwrite an existing entry, causing two lookups of the same key. Fix by recording the size prior to the execution of the indexing operator and taking a size increase as the cue to populate the (new) entry. This way, we look up the key only once. Also fix two instances of double lookup caused by the if (contains()) { value() } anti-pattern. Change-Id: I961fe45ec571aa94aff5dd578f2276e7b74d800d Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/plugin/qcoffpeparser.cpp')
0 files changed, 0 insertions, 0 deletions