diff --git a/src/Collections/Dictionary.hpp b/src/Collections/Dictionary.hpp index 13ea997..891bda4 100644 --- a/src/Collections/Dictionary.hpp +++ b/src/Collections/Dictionary.hpp @@ -33,26 +33,14 @@ namespace Arbutils::Collections { [[nodiscard]] inline ValueT& Get(const KeyT& key) { #ifndef NO_ASSERT - const auto& find = _map.find(key); - if (find == _map.end()) { - throw std::logic_error("Key not found"); - } - return find->second; + return _map.at(key); #else return _map[key]; #endif } [[nodiscard]] inline const ValueT& Get(const KeyT& key) const { -#ifndef NO_ASSERT - const auto& find = _map.find(key); - if (find == _map.end()) { - throw std::logic_error("Key not found"); - } - return find->second; -#else return _map.at(key); -#endif } inline bool TryGet(const KeyT& key, ValueT& out) const {