From 9dc7a0c6e3c7cae96c4002130b1d12294fdc6535 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 16 May 2022 17:00:12 +0200 Subject: [PATCH] Adds function to remove by hashed value in StringViewDictionary --- src/Collections/StringViewDictionary.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Collections/StringViewDictionary.hpp b/src/Collections/StringViewDictionary.hpp index 6942ec7..5a62992 100644 --- a/src/Collections/StringViewDictionary.hpp +++ b/src/Collections/StringViewDictionary.hpp @@ -107,6 +107,9 @@ namespace ArbUt { /// @brief Removes an item with a certain key from the dictionary inline void Remove(const StringView& key) { _map.erase(key); } + /// @brief Removes an item with a certain key hash from the dictionary + inline void Remove(u32 keyHash) { _map.erase(keyHash); } + /// @brief Returns the number of items in the dictionary. [[nodiscard]] inline size_t Count() const noexcept { return _map.size(); }