Cleanup: always run both FOREACH_MAIN_ID_BEGIN & END macros

Also correct the "END" macro being used in the wrong scope.
This commit is contained in:
Campbell Barton 2023-09-14 11:45:04 +10:00
parent fad72f6daa
commit ee6b39ae86
2 changed files with 5 additions and 4 deletions

View File

@ -158,12 +158,14 @@ void BKE_main_free(Main *mainvar)
bool BKE_main_is_empty(Main *bmain)
{
bool result = true;
ID *id_iter;
FOREACH_MAIN_ID_BEGIN (bmain, id_iter) {
return false;
result = false;
break;
}
FOREACH_MAIN_ID_END;
return true;
return result;
}
void BKE_main_lock(Main *bmain)

View File

@ -1070,9 +1070,8 @@ static void version_nla_action_strip_hold(Main *bmain)
if (BKE_nlatrack_has_strips(&adt->nla_tracks)) {
adt->act_extendmode = NLASTRIP_EXTEND_HOLD;
}
FOREACH_MAIN_ID_END;
}
FOREACH_MAIN_ID_END;
}
void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain)