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-06-10 15:12:24 +0300
committerJacques Lucke <jacques@blender.org>2020-06-10 15:15:04 +0300
commit84a0a6d16c85105cf755141c4d49afc52eb157e3 (patch)
tree2b751e4dc6cb98cbb04459eb0b8c89db5d969cf5 /source/blender/depsgraph/intern/depsgraph_physics.cc
parentf367f1e5a55e1c657f9d2088f6537fb2e73492f0 (diff)
BLI: update behavior of Map.lookup_or_add
Previously, this function would expect a callback function as parameter. This behavior is now in Map.lookup_or_add_cb. The new version just takes the key and value directly.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_physics.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_physics.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_physics.cc b/source/blender/depsgraph/intern/depsgraph_physics.cc
index 44c3d23ace4..ad67117fda3 100644
--- a/source/blender/depsgraph/intern/depsgraph_physics.cc
+++ b/source/blender/depsgraph/intern/depsgraph_physics.cc
@@ -167,7 +167,7 @@ ListBase *build_effector_relations(Depsgraph *graph, Collection *collection)
graph->physics_relations[DEG_PHYSICS_EFFECTOR] = new Map<const ID *, ListBase *>();
hash = graph->physics_relations[DEG_PHYSICS_EFFECTOR];
}
- return hash->lookup_or_add(&collection->id, [&]() {
+ return hash->lookup_or_add_cb(&collection->id, [&]() {
::Depsgraph *depsgraph = reinterpret_cast<::Depsgraph *>(graph);
return BKE_effector_relations_create(depsgraph, graph->view_layer, collection);
});
@@ -183,7 +183,7 @@ ListBase *build_collision_relations(Depsgraph *graph,
graph->physics_relations[type] = new Map<const ID *, ListBase *>();
hash = graph->physics_relations[type];
}
- return hash->lookup_or_add(&collection->id, [&]() {
+ return hash->lookup_or_add_cb(&collection->id, [&]() {
::Depsgraph *depsgraph = reinterpret_cast<::Depsgraph *>(graph);
return BKE_collision_relations_create(depsgraph, collection, modifier_type);
});