[Bf-blender-cvs] [785289594be] functions: SmallMap.add should not replace existing entries
Jacques Lucke
noreply at git.blender.org
Sun Feb 10 20:26:49 CET 2019
Commit: 785289594beeb7c54e75083a24888c900d38e85a
Author: Jacques Lucke
Date: Fri Feb 8 16:45:44 2019 +0100
Branches: functions
https://developer.blender.org/rB785289594beeb7c54e75083a24888c900d38e85a
SmallMap.add should not replace existing entries
===================================================================
M source/blender/blenlib/BLI_small_map.hpp
===================================================================
diff --git a/source/blender/blenlib/BLI_small_map.hpp b/source/blender/blenlib/BLI_small_map.hpp
index 19335ac7fe4..f57b8ed3ba3 100644
--- a/source/blender/blenlib/BLI_small_map.hpp
+++ b/source/blender/blenlib/BLI_small_map.hpp
@@ -25,12 +25,7 @@ namespace BLI {
void add(K key, V value)
{
- for (Entry &entry : m_entries) {
- if (entry.key == key) {
- entry.value = value;
- return;
- }
- }
+ BLI_assert(!this->contains(key));
m_entries.append(Entry(key, value));
}
More information about the Bf-blender-cvs
mailing list