[Bf-blender-cvs] [bb9d068ccc2] blender2.8: Depsgraph: Cleanup, use more explicit way to fill in a structure

Sergey Sharybin noreply at git.blender.org
Thu Dec 14 12:09:55 CET 2017


Commit: bb9d068ccc2b86d4f3fc06fceca90f26e34cdf7e
Author: Sergey Sharybin
Date:   Thu Dec 14 11:09:18 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBbb9d068ccc2b86d4f3fc06fceca90f26e34cdf7e

Depsgraph: Cleanup, use more explicit way to fill in a structure

The possible issue with just listing arguments is that it might not be clear
what particular value is used for. For example, is it a scene itself, or is
it a parent scene?

Not as if it's not very clear now, but better be explicit for the future,
and me reading code in 10 years.

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

M	source/blender/depsgraph/intern/eval/deg_eval_flush.cc

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

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index d37e0915548..fecc9a75a14 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -234,11 +234,10 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
 	FlushQueue queue;
 	flush_schedule_entrypoints(graph, &queue);
 	/* Prepare update context for editors. */
-	DEGEditorUpdateContext update_ctx = {
-		bmain,
-		graph->scene,
-		graph->view_layer,
-	};
+	DEGEditorUpdateContext update_ctx;
+	update_ctx.bmain = bmain;
+	update_ctx.scene = graph->scene;
+	update_ctx.view_layer = graph->view_layer;
 	/* Do actual flush. */
 	while (!queue.empty()) {
 		OperationDepsNode *op_node = queue.front();



More information about the Bf-blender-cvs mailing list