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-28 13:49:52 +0300
committerJacques Lucke <jacques@blender.org>2020-04-28 13:49:52 +0300
commitb21a3e770277aef4d7a17b9b72c1c622493a5eb9 (patch)
tree3d144dfefb0ac5bcf21213fd0309b5d35078ba2c /source/blender/depsgraph/intern/eval
parent9c2715ffda93a7625955a453a6dacaa4b601dd89 (diff)
Depsgraph: Use BLI::Map in more places
Reviewers: sergey Differential Revision: https://developer.blender.org/D7519
Diffstat (limited to 'source/blender/depsgraph/intern/eval')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc10
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_stats.cc3
2 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 990002cf2e8..15a965ad2b0 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -94,9 +94,9 @@ void flush_init_id_node_func(void *__restrict data_v,
Depsgraph *graph = (Depsgraph *)data_v;
IDNode *id_node = graph->id_nodes[i];
id_node->custom_flags = ID_STATE_NONE;
- GHASH_FOREACH_BEGIN (ComponentNode *, comp_node, id_node->components)
+ for (ComponentNode *comp_node : id_node->components.values()) {
comp_node->custom_flags = COMPONENT_STATE_NONE;
- GHASH_FOREACH_END();
+ }
}
BLI_INLINE void flush_prepare(Depsgraph *graph)
@@ -231,7 +231,7 @@ void flush_editors_id_update(Depsgraph *graph, const DEGEditorUpdateContext *upd
ID *id_orig = id_node->id_orig;
ID *id_cow = id_node->id_cow;
/* Gather recalc flags from all changed components. */
- GHASH_FOREACH_BEGIN (ComponentNode *, comp_node, id_node->components) {
+ for (DEG::ComponentNode *comp_node : id_node->components.values()) {
if (comp_node->custom_flags != COMPONENT_STATE_DONE) {
continue;
}
@@ -239,7 +239,6 @@ void flush_editors_id_update(Depsgraph *graph, const DEGEditorUpdateContext *upd
BLI_assert(factory != nullptr);
id_cow->recalc |= factory->id_recalc_tag();
}
- GHASH_FOREACH_END();
DEG_DEBUG_PRINTF((::Depsgraph *)graph,
EVAL,
"Accumulated recalc bits for %s: %u\n",
@@ -307,7 +306,7 @@ void invalidate_tagged_evaluated_data(Depsgraph *graph)
if (!deg_copy_on_write_is_expanded(id_cow)) {
continue;
}
- GHASH_FOREACH_BEGIN (ComponentNode *, comp_node, id_node->components) {
+ for (ComponentNode *comp_node : id_node->components.values()) {
if (comp_node->custom_flags != COMPONENT_STATE_DONE) {
continue;
}
@@ -322,7 +321,6 @@ void invalidate_tagged_evaluated_data(Depsgraph *graph)
break;
}
}
- GHASH_FOREACH_END();
}
#else
(void)graph;
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_stats.cc b/source/blender/depsgraph/intern/eval/deg_eval_stats.cc
index f164560ac24..59e9047971b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_stats.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_stats.cc
@@ -41,10 +41,9 @@ void deg_eval_stats_aggregate(Depsgraph *graph)
* Those are not filled in by the evaluation engine. */
for (Node *node : graph->id_nodes) {
IDNode *id_node = (IDNode *)node;
- GHASH_FOREACH_BEGIN (ComponentNode *, comp_node, id_node->components) {
+ for (ComponentNode *comp_node : id_node->components.values()) {
comp_node->stats.reset_current();
}
- GHASH_FOREACH_END();
id_node->stats.reset_current();
}
/* Now accumulate operation timings to components and IDs. */