diff --git a/src/Collections/Dictionary.hpp b/src/Collections/Dictionary.hpp index 46fd652..5c793cf 100644 --- a/src/Collections/Dictionary.hpp +++ b/src/Collections/Dictionary.hpp @@ -14,6 +14,10 @@ namespace Arbutils::Collections { explicit Dictionary(size_t capacity) : _map(capacity) {} explicit Dictionary(const std::initializer_list>& l) : _map(l){} + inline void Clear(){ + _map.clear(); + } + inline void Insert(KeyT key, ValueT value) { auto v = _map.insert({key, value}); #ifndef NO_ASSERT diff --git a/src/Collections/List.hpp b/src/Collections/List.hpp index 054f3e4..d28c411 100644 --- a/src/Collections/List.hpp +++ b/src/Collections/List.hpp @@ -16,6 +16,10 @@ namespace Arbutils::Collections { explicit List(size_t capacity) : _vector(capacity) {} List(const std::initializer_list& l) : _vector(l) {} + inline void Clear(){ + _vector.clear(); + } + inline const ValueT& At(size_t index) const { #ifndef NO_ASSERT if (index >= _vector.size()) {