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:
parent
5137f96bd6
commit
f76241914c
2 changed files with 16 additions and 0 deletions
|
@ -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) }); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue