diff options
author | Bastien Montagne <bastien@blender.org> | 2022-07-21 13:17:30 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-07-21 13:18:57 +0300 |
commit | d099e0d2a4875b03c6b91c39817ffc11c4357797 (patch) | |
tree | c46b07cc7ba1f9577aad370fa540b79a9b60f089 /source | |
parent | f7252e9692ba22b9ca42394e5e21d0b52cbb872c (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.cc | 5 |
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. */ |