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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-07-21 13:17:30 +0300
committerBastien Montagne <bastien@blender.org>2022-07-21 13:18:57 +0300
commitd099e0d2a4875b03c6b91c39817ffc11c4357797 (patch)
treec46b07cc7ba1f9577aad370fa540b79a9b60f089 /source
parentf7252e9692ba22b9ca42394e5e21d0b52cbb872c (diff)
Cleanup: Make automated code check happy.
- Assert that one of the thwo branches in `id_override_library_create_hierarchy` are always processed. - Init success value regardless.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index e1aa695a262..80ee3bbb6a1 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -1025,7 +1025,7 @@ static void id_override_library_create_hierarchy(
}
FOREACH_MAIN_ID_END;
- bool success;
+ bool success = false;
if (do_hierarchy) {
ID *id_root_override = nullptr;
success = BKE_lib_override_library_create(&bmain,
@@ -1073,6 +1073,9 @@ static void id_override_library_create_hierarchy(
BKE_main_id_newptr_and_tag_clear(&bmain);
BKE_main_id_tag_all(&bmain, LIB_TAG_DOIT, false);
}
+ else {
+ BLI_assert_unreachable();
+ }
/* Remove the instance empty from this scene, the items now have an overridden collection
* instead. */