diff --git a/BAN/include/BAN/HashMap.h b/BAN/include/BAN/HashMap.h index d869c3c53..91c3dccbc 100644 --- a/BAN/include/BAN/HashMap.h +++ b/BAN/include/BAN/HashMap.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include namespace BAN @@ -56,11 +57,11 @@ namespace BAN private: ErrorOr rebucket(size_type); - Vector& get_bucket(const Key&); - const Vector& get_bucket(const Key&) const; + LinkedList& get_bucket(const Key&); + const LinkedList& get_bucket(const Key&) const; private: - Vector> m_buckets; + Vector> m_buckets; size_type m_size = 0; }; @@ -209,7 +210,7 @@ namespace BAN return {}; size_type new_bucket_count = BAN::Math::max(bucket_count, m_buckets.size() * 2); - Vector> new_buckets; + Vector> new_buckets; if (new_buckets.resize(new_bucket_count).is_error()) return Error::from_string("HashMap: Could not allocate memory"); @@ -230,7 +231,7 @@ namespace BAN } template - Vector::Entry>& HashMap::get_bucket(const Key& key) + LinkedList::Entry>& HashMap::get_bucket(const Key& key) { ASSERT(!m_buckets.empty()); auto index = HASH()(key) % m_buckets.size(); @@ -238,7 +239,7 @@ namespace BAN } template - const Vector::Entry>& HashMap::get_bucket(const Key& key) const + const LinkedList::Entry>& HashMap::get_bucket(const Key& key) const { ASSERT(!m_buckets.empty()); auto index = HASH()(key) % m_buckets.size();