summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2021-11-16 16:34:32 +0100
committerMarc Mutz <marc.mutz@qt.io>2021-11-19 16:28:45 +0100
commita3303aceeb49c6c7a5fc21e083715ddbb989a9b0 (patch)
tree0cd5dc9436bf7b5e6bb6871c02336430436cc74e /qmake
parent7fe5611365aa9d5065fe8ba62fed9a07c722ea1c (diff)
QLoggingRegistry: avoid double-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. Change-Id: Ica039035fe9ea4b88c20184784c324c9fac33d49 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'qmake')
0 files changed, 0 insertions, 0 deletions