optimized blenloader for loops #106573

Closed
glitchy-virophage wants to merge 31 commits from (deleted):main into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 8ad6e5819d - Show all commits

View File

@ -44,7 +44,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
ListBase *lbarray[INDEX_ID_MAX];
int i = set_listbasepointers(bmain, lbarray);
while (i--) {
while (--i) {
for (ID *id = static_cast<ID *>(lbarray[i]->first); id != nullptr;
id = static_cast<ID *>(id->next)) {
if (ID_IS_LINKED(id)) {
@ -80,7 +80,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
}
i = set_listbasepointers(curmain, lbarray);
while (i--) {
while (--i) {
ID *id = static_cast<ID *>(lbarray[i]->first);
if (id == nullptr) {
continue;