1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:17:35 +00:00

AK: Allow to clear HashTables/Maps with capacity

This commit is contained in:
Hendiadyoin1 2021-09-20 23:43:52 +02:00 committed by Andreas Kling
parent 5137f96bd6
commit f76241914c
2 changed files with 16 additions and 0 deletions

View file

@ -46,6 +46,7 @@ public:
[[nodiscard]] size_t size() const { return m_table.size(); }
[[nodiscard]] size_t capacity() const { return m_table.capacity(); }
void clear() { m_table.clear(); }
void clear_with_capacity() { m_table.clear_with_capacity(); }
HashSetResult set(const K& key, const V& value) { return m_table.set({ key, value }); }
HashSetResult set(const K& key, V&& value) { return m_table.set({ key, move(value) }); }