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.
This commit is contained in:
Bastien Montagne
2022-07-21 12:17:30 +02:00
parent f7252e9692
commit d099e0d2a4

View File

@@ -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. */