Don't throw compilation error when NO_ASSERT is used.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Arbutils::Collections {
|
||||
}
|
||||
|
||||
inline void Insert(const KeyT& key, const ValueT& value) {
|
||||
auto v = _map.insert({key, value});
|
||||
[[maybe_unused]] auto v = _map.insert({key, value});
|
||||
#ifndef NO_ASSERT
|
||||
if (!v.second)
|
||||
throw std::logic_error("Key already exists");
|
||||
|
||||
Reference in New Issue
Block a user