summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author Anton Ivanov <aii@google.com> 2025-02-06 22:47:35 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-06 22:47:35 -0800
commit8ce652f7ff008c8fc09d2168ced15602ba12f130 (patch)
treee85afb675f3a0bd685c5821361900e5d51a332bb /include
parentaedbed0cd2ce7a2caf16466f060ebee464b02b3e (diff)
parent7016de508cdae8dc94b1ff60e5292859642e4aac (diff)
Merge "Reduce heap allocations in BLASTBufferQueue." into main
Diffstat (limited to 'include')
-rw-r--r--include/ftl/small_map.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ftl/small_map.h b/include/ftl/small_map.h
index 83d5967464..96d35cd21e 100644
--- a/include/ftl/small_map.h
+++ b/include/ftl/small_map.h
@@ -234,6 +234,12 @@ class SmallMap final {
//
bool erase(const key_type& key) { return erase(key, begin()); }
+ // Removes a mapping.
+ //
+ // The last() and end() iterators, as well as those to the erased mapping, are invalidated.
+ //
+ void erase(iterator it) { map_.unstable_erase(it); }
+
// Removes all mappings.
//
// All iterators are invalidated.