diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-23 09:17:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-23 09:18:09 +0300 |
commit | 4e6a82d8478d29622c0c6176423f7ceb20088ade (patch) | |
tree | b6d7c89af3aa5ef0ed7c3492b98123a3dc66f310 /source/blender/depsgraph | |
parent | 36148f20ec7d5465c2ec24b874fa31e6b038fccc (diff) |
Cleanup: use static functions
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query_filter.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_filter.cc b/source/blender/depsgraph/intern/depsgraph_query_filter.cc index da6b239cc0a..46abd9d9941 100644 --- a/source/blender/depsgraph/intern/depsgraph_query_filter.cc +++ b/source/blender/depsgraph/intern/depsgraph_query_filter.cc @@ -81,7 +81,7 @@ struct RetainedIdUserData { /* Helper for DEG_foreach_ancestor_id() * Keep track of all ID's encountered in a set */ -void deg_add_retained_id_cb(ID *id, void *user_data) +static void deg_add_retained_id_cb(ID *id, void *user_data) { RetainedIdUserData *data = (RetainedIdUserData *)user_data; BLI_gset_add(data->set, (void *)id); @@ -91,7 +91,7 @@ void deg_add_retained_id_cb(ID *id, void *user_data) /* Remove relations pointing to the given OperationDepsNode */ /* TODO: Make this part of OperationDepsNode? */ -void deg_unlink_opnode(Depsgraph *graph, OperationDepsNode *op_node) +static void deg_unlink_opnode(Depsgraph *graph, OperationDepsNode *op_node) { std::vector<DepsRelation *> all_links; @@ -117,7 +117,7 @@ void deg_unlink_opnode(Depsgraph *graph, OperationDepsNode *op_node) } /* Remove every ID Node (and its associated subnodes, COW data) */ -void deg_filter_remove_unwanted_ids(Depsgraph *graph, GSet *retained_ids) +static void deg_filter_remove_unwanted_ids(Depsgraph *graph, GSet *retained_ids) { /* 1) First pass over ID nodes + their operations * - Identify and tag ID's (via "done = 1") to be removed @@ -163,7 +163,7 @@ void deg_filter_remove_unwanted_ids(Depsgraph *graph, GSet *retained_ids) { IDDepsNode *id_node = *it_id; ID *id = id_node->id_orig; - + if (id_node->done) { /* Destroy node data, then remove from collections, and free */ id_node->destroy(); @@ -213,7 +213,7 @@ Depsgraph *DEG_graph_filter(const Depsgraph *graph_src, Main *bmain, DEG_FilterQ LISTBASE_FOREACH(DEG_FilterTarget *, target, &query->targets) { /* Target Itself */ BLI_gset_add(retained_ids, (void *)target->id); - + /* Target's Ancestors (i.e. things it depends on) */ DEG_foreach_ancestor_ID(graph_new, target->id, @@ -244,7 +244,7 @@ Depsgraph *DEG_graph_filter(const Depsgraph *graph_src, Main *bmain, DEG_FilterQ DEG_stats_simple(graph_src, &s_outer, &s_operations, &s_relations); DEG_stats_simple(graph_new, &n_outer, &n_operations, &n_relations); - + printf("%s: src = (ID's: %zu (%u), Out: %zu, Op: %zu, Rel: %zu)\n", __func__, s_ids, s_idh, s_outer, s_operations, s_relations); printf("%s: new = (ID's: %zu (%u), Out: %zu, Op: %zu, Rel: %zu)\n", |