[Bf-blender-cvs] [5bda458bce5] master: Depsgraph: Remove unused argument from time source query

Sergey Sharybin noreply at git.blender.org
Thu Jun 1 16:22:50 CEST 2017


Commit: 5bda458bce54d66da44ceb72202d9a2a36b12df3
Author: Sergey Sharybin
Date:   Thu Jun 1 15:38:15 2017 +0200
Branches: master
https://developer.blender.org/rB5bda458bce54d66da44ceb72202d9a2a36b12df3

Depsgraph: Remove unused argument from time source query

===================================================================

M	source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
M	source/blender/depsgraph/intern/depsgraph.cc
M	source/blender/depsgraph/intern/depsgraph.h
M	source/blender/depsgraph/intern/depsgraph_debug.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
index 3df4ee0c3dd..96325fb3822 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
@@ -506,7 +506,7 @@ static void deg_debug_graphviz_graph_nodes(const DebugContext &ctx,
 		deg_debug_graphviz_node(ctx, node);
 	}
 	GHASH_FOREACH_END();
-	TimeSourceDepsNode *time_source = graph->find_time_source(NULL);
+	TimeSourceDepsNode *time_source = graph->find_time_source();
 	if (time_source != NULL) {
 		deg_debug_graphviz_node(ctx, time_source);
 	}
@@ -527,7 +527,7 @@ static void deg_debug_graphviz_graph_relations(const DebugContext &ctx,
 	}
 	GHASH_FOREACH_END();
 
-	TimeSourceDepsNode *time_source = graph->find_time_source(NULL);
+	TimeSourceDepsNode *time_source = graph->find_time_source();
 	if (time_source != NULL) {
 		deg_debug_graphviz_node_relations(ctx, time_source);
 	}
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 808e3f80bef..30146544b76 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -269,25 +269,10 @@ RootDepsNode *Depsgraph::add_root_node()
 	return root_node;
 }
 
-TimeSourceDepsNode *Depsgraph::find_time_source(const ID *id) const
+TimeSourceDepsNode *Depsgraph::find_time_source() const
 {
-	/* Search for one attached to a particular ID? */
-	if (id) {
-		/* Check if it was added as a component
-		 * (as may be done for subgraphs needing timeoffset).
-		 */
-		IDDepsNode *id_node = find_id_node(id);
-		if (id_node) {
-			// XXX: review this
-//			return id_node->find_component(DEPSNODE_TYPE_TIMESOURCE);
-		}
-		BLI_assert(!"Not implemented yet");
-	}
-	else {
-		/* Use "official" timesource. */
-		return root_node->time_source;
-	}
-	return NULL;
+	BLI_assert(root_node != NULL);
+	return root_node->time_source;
 }
 
 IDDepsNode *Depsgraph::find_id_node(const ID *id) const
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 8622d378472..1c9ba8c4cb1 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -110,7 +110,7 @@ struct Depsgraph {
 
 	RootDepsNode *add_root_node();
 
-	TimeSourceDepsNode *find_time_source(const ID *id = NULL) const;
+	TimeSourceDepsNode *find_time_source() const;
 
 	IDDepsNode *find_id_node(const ID *id) const;
 	IDDepsNode *add_id_node(ID *id, const char *name = "");
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc
index d3b48930779..0a8a57ae09f 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.cc
+++ b/source/blender/depsgraph/intern/depsgraph_debug.cc
@@ -232,7 +232,7 @@ void DEG_stats_simple(const Depsgraph *graph, size_t *r_outer,
 		}
 		GHASH_FOREACH_END();
 
-		DEG::TimeSourceDepsNode *time_source = deg_graph->find_time_source(NULL);
+		DEG::TimeSourceDepsNode *time_source = deg_graph->find_time_source();
 		if (time_source != NULL) {
 			tot_rels += time_source->inlinks.size();
 		}




More information about the Bf-blender-cvs mailing list