Don't throw compilation error when NO_ASSERT is used.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
91b9854932
commit
479a240c6f
|
@ -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");
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
name() : _str(GetEmptyString()), _length(0), _hash(Hash("")) { GetEmptyString()->AddReference(); }; \
|
||||
explicit name(const char* str) : name(str, Length(str)){}; \
|
||||
explicit name(const std::string& str) : name(str.c_str(), str.size()){}; \
|
||||
\
|
||||
/* Copy operators */ \
|
||||
name(const name& other) : _str(other.CloneHolder()), _length(other._length), _hash(other._hash) {} \
|
||||
name& operator=(const name& other) { \
|
||||
if (_str == other._str) { \
|
||||
|
|
Loading…
Reference in New Issue