summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qflatmap_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-01-28 00:47:47 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-01-28 22:00:22 +0100
commitd030606a5a6c9c30972892f94ac656e983183349 (patch)
treebf00ee9b25f0706a526c702833c38d04b7eb735b /src/corelib/tools/qflatmap_p.h
parent1cb192bf3da88c97e7622d4813053a4ca916044e (diff)
QFlatMap: use erase() in remove()
De-duplicates code. Pick-to: 6.3 6.2 Change-Id: I95d3d6f57c2f3716b8f3f549d1cc2a02cde9e996 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/tools/qflatmap_p.h')
-rw-r--r--src/corelib/tools/qflatmap_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h
index acfcf5e778..3be517a483 100644
--- a/src/corelib/tools/qflatmap_p.h
+++ b/src/corelib/tools/qflatmap_p.h
@@ -609,8 +609,7 @@ public:
{
auto it = binary_find(key);
if (it != end()) {
- c.keys.erase(toKeysIterator(it));
- c.values.erase(toValuesIterator(it));
+ erase(it);
return true;
}
return false;