From 7c98d3d4eb59a9cbf9c0d5f1757a3fc0faedbb89 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 22 Mar 2020 17:18:53 +0100 Subject: [PATCH] Implements Remove function for Dictionary. --- src/Collections/Dictionary.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Collections/Dictionary.hpp b/src/Collections/Dictionary.hpp index 5c793cf..3499109 100644 --- a/src/Collections/Dictionary.hpp +++ b/src/Collections/Dictionary.hpp @@ -61,6 +61,10 @@ namespace Arbutils::Collections { return true; } + inline void Remove(KeyT key){ + _map.erase(key); + } + [[nodiscard]] inline size_t Count() const { return _map.size(); } inline bool Has(KeyT key) const noexcept { return _map.find(key) != _map.end(); }