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-07-24 13:15:13 +0300
committerJacques Lucke <jacques@blender.org>2020-07-24 13:15:13 +0300
commitb53c46d760568f02cd8be45547a4ffacad3c7b47 (patch)
tree51abc55d4735fedefbfccca6d4e13b074f75f88b /source/blender/nodes/intern/derived_node_tree.cc
parent141deeefff5f68a3fd629f91ddda22ba49f9a4e0 (diff)
BLI: add MultiValueMap
This is a convenience wrapper for `Map<Key, Vector<Value>>`. It does not provide any performance benefits (yet). I need this kind of map in a couple of places and before I was duplicating the lookup logic in many places.
Diffstat (limited to 'source/blender/nodes/intern/derived_node_tree.cc')
-rw-r--r--source/blender/nodes/intern/derived_node_tree.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/derived_node_tree.cc b/source/blender/nodes/intern/derived_node_tree.cc
index b7c78cb1499..5414ea9208a 100644
--- a/source/blender/nodes/intern/derived_node_tree.cc
+++ b/source/blender/nodes/intern/derived_node_tree.cc
@@ -321,7 +321,7 @@ BLI_NOINLINE void DerivedNodeTree::store_in_this_and_init_ids(
node->id_ = node_index;
const bNodeType *nodetype = node->node_ref_->bnode()->typeinfo;
- nodes_by_type_.lookup_or_add_default(nodetype).append(node);
+ nodes_by_type_.add(nodetype, node);
for (DInputSocket *socket : node->inputs_) {
socket->id_ = sockets_by_id_.append_and_get_index(socket);