BAN: Fix HashMap::{insert,emplace}_or_assign to actually assing value
I seemed to completely forgotten to do the assignment itself :D
This commit is contained in:
parent
1838ea5c30
commit
a82f00cb70
|
@ -153,8 +153,13 @@ namespace BAN
|
|||
return emplace(move(key), forward<Args>(args)...);
|
||||
auto& bucket = get_bucket(key);
|
||||
for (Entry& entry : bucket)
|
||||
{
|
||||
if (entry.key == key)
|
||||
{
|
||||
entry.value = T(forward<Args>(args)...);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
TRY(bucket.emplace_back(move(key), forward<Args>(args)...));
|
||||
m_size++;
|
||||
return {};
|
||||
|
|
Loading…
Reference in New Issue