diff options
author | Jacques Lucke <jacques@blender.org> | 2020-04-24 23:33:48 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-04-24 23:33:48 +0300 |
commit | 62f6255b476a9fbd2c85b8fc7466734da912fa34 (patch) | |
tree | 53513a3c6f04783b87536953af2511f9b260077e /source/blender/blenlib/BLI_map.hh | |
parent | fd10ac9acaa0788ef5e73677a97e5cff27978d0c (diff) |
BLI: Implement StringMap.add and StringMap.add_or_modify
Diffstat (limited to 'source/blender/blenlib/BLI_map.hh')
-rw-r--r-- | source/blender/blenlib/BLI_map.hh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_map.hh b/source/blender/blenlib/BLI_map.hh index 4e8c9f67338..553175b0395 100644 --- a/source/blender/blenlib/BLI_map.hh +++ b/source/blender/blenlib/BLI_map.hh @@ -149,9 +149,7 @@ class Map { template<typename ForwardKeyT, typename ForwardValueT> void store(uint offset, ForwardKeyT &&key, ForwardValueT &&value) { - BLI_assert(m_status[offset] != IS_SET); - m_status[offset] = IS_SET; - new (this->key(offset)) KeyT(std::forward<ForwardKeyT>(key)); + this->store_without_value(offset, std::forward<ForwardKeyT>(key)); new (this->value(offset)) ValueT(std::forward<ForwardValueT>(value)); } |