From 3bc09c1c1ec9c1699ac872bc643d3e38c250803f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 21 Aug 2020 11:56:03 +0200 Subject: Cleanup: split `BKE_scene_get_depsgraph()` into two functions Split the depsgraph allocation into a separate function `BKE_scene_ensure_depsgraph()`. Parameters are only passed to those functions that actually need them. This removes the the "if that boolean is `false` this pointer is allowed to be `NULL`" logic and more cleanly decouples code. No functional changes. --- source/blender/editors/space_info/info_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_info/info_stats.c') diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index e97031736ca..301e88b0904 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -426,7 +426,7 @@ static bool format_stats(Main *bmain, if (wm->is_interface_locked) { return false; } - Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true); + Depsgraph *depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, view_layer); stats_update(depsgraph, view_layer); } -- cgit v1.2.3