Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-04-24 23:33:48 +0300
committerJacques Lucke <jacques@blender.org>2020-04-24 23:33:48 +0300
commit62f6255b476a9fbd2c85b8fc7466734da912fa34 (patch)
tree53513a3c6f04783b87536953af2511f9b260077e /source/blender/blenlib/BLI_map.hh
parentfd10ac9acaa0788ef5e73677a97e5cff27978d0c (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.hh4
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));
}