diff --git a/AK/HashMap.h b/AK/HashMap.h index 4060dee6b9..4a70319c1a 100644 --- a/AK/HashMap.h +++ b/AK/HashMap.h @@ -56,6 +56,11 @@ public: { return m_table.find(KeyTraits::hash(key), [&](auto& entry) { return KeyTraits::equals(key, entry.key); }); } + template + IteratorType find(unsigned hash, Finder finder) + { + return m_table.find(hash, finder); + } ConstIteratorType begin() const { return m_table.begin(); } ConstIteratorType end() const { return m_table.end(); } @@ -63,6 +68,11 @@ public: { return m_table.find(KeyTraits::hash(key), [&](auto& entry) { return KeyTraits::equals(key, entry.key); }); } + template + ConstIteratorType find(unsigned hash, Finder finder) const + { + return m_table.find(hash, finder); + } void ensure_capacity(int capacity) { m_table.ensure_capacity(capacity); }