diff --git a/deps/ox/src/ox/std/hashmap.hpp b/deps/ox/src/ox/std/hashmap.hpp index d38e2c8f..01334352 100644 --- a/deps/ox/src/ox/std/hashmap.hpp +++ b/deps/ox/src/ox/std/hashmap.hpp @@ -64,6 +64,9 @@ class HashMap { [[nodiscard]] constexpr Vector const&keys() const noexcept; + [[nodiscard]] + constexpr Vector values() const noexcept; + constexpr void clear(); private: @@ -198,6 +201,16 @@ constexpr Vector const&HashMap::keys() const noexcept { return m_keys; } +template +constexpr Vector HashMap::values() const noexcept { + Vector out; + out.reserve(m_pairs.size()); + for (auto const&p : m_pairs) { + out.emplace_back(p->value); + } + return out; +} + template constexpr void HashMap::clear() { for (std::size_t i = 0; i < m_pairs.size(); i++) {