mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
HashMap: Rename finders with a more accurate and self-descripting name
This commit is contained in:
parent
213e2af281
commit
3b81ba7c4f
1 changed files with 6 additions and 6 deletions
12
AK/HashMap.h
12
AK/HashMap.h
|
@ -78,10 +78,10 @@ public:
|
||||||
{
|
{
|
||||||
return m_table.find(KeyTraits::hash(key), [&](auto& entry) { return KeyTraits::equals(key, entry.key); });
|
return m_table.find(KeyTraits::hash(key), [&](auto& entry) { return KeyTraits::equals(key, entry.key); });
|
||||||
}
|
}
|
||||||
template<typename Finder>
|
template<typename TUnaryPredicate>
|
||||||
IteratorType find(unsigned hash, Finder finder)
|
IteratorType find(unsigned hash, TUnaryPredicate predicate)
|
||||||
{
|
{
|
||||||
return m_table.find(hash, finder);
|
return m_table.find(hash, predicate);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConstIteratorType begin() const { return m_table.begin(); }
|
ConstIteratorType begin() const { return m_table.begin(); }
|
||||||
|
@ -90,10 +90,10 @@ public:
|
||||||
{
|
{
|
||||||
return m_table.find(KeyTraits::hash(key), [&](auto& entry) { return KeyTraits::equals(key, entry.key); });
|
return m_table.find(KeyTraits::hash(key), [&](auto& entry) { return KeyTraits::equals(key, entry.key); });
|
||||||
}
|
}
|
||||||
template<typename Finder>
|
template<typename TUnaryPredicate>
|
||||||
ConstIteratorType find(unsigned hash, Finder finder) const
|
ConstIteratorType find(unsigned hash, TUnaryPredicate predicate) const
|
||||||
{
|
{
|
||||||
return m_table.find(hash, finder);
|
return m_table.find(hash, predicate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ensure_capacity(size_t capacity) { m_table.ensure_capacity(capacity); }
|
void ensure_capacity(size_t capacity) { m_table.ensure_capacity(capacity); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue