Code Quality: Replace for loops with LISTBASE_FOREACH

Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.

Differential Revision: https://developer.blender.org/D7320
This commit is contained in:
2020-04-03 19:15:01 +02:00
parent b0c1184875
commit d138cbfb47
207 changed files with 1174 additions and 1251 deletions

View File

@@ -92,7 +92,7 @@ void BPy_reports_write_stdout(const ReportList *reports, const char *header)
PySys_WriteStdout("%s\n", header);
}
for (const Report *report = reports->list.first; report; report = report->next) {
LISTBASE_FOREACH (const Report *, report, &reports->list) {
PySys_WriteStdout("%s: %s\n", report->typestr, report->message);
}
}