diff options
author | Dalai Felinto <dalai@blender.org> | 2020-04-03 20:15:01 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2020-04-03 20:27:46 +0300 |
commit | d138cbfb47e379edc1ee915a8c6ff65b01f000d6 (patch) | |
tree | f4773ecce897c32eaf75295dd5f6a8e730d471ed /source/blender/editors/space_info | |
parent | b0c1184875d39abac4a65a5d20e263ea6d841009 (diff) |
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
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r-- | source/blender/editors/space_info/info_report.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index 7499c057950..adc6391a0f6 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -250,7 +250,7 @@ static int box_select_exec(bContext *C, wmOperator *op) const eSelectOp sel_op = RNA_enum_get(op->ptr, "mode"); const int select = (sel_op != SEL_OP_SUB); if (SEL_OP_USE_PRE_DESELECT(sel_op)) { - for (Report *report = reports->list.first; report; report = report->next) { + LISTBASE_FOREACH (Report *, report, &reports->list) { if ((report->type & report_mask) == 0) { continue; } @@ -264,7 +264,7 @@ static int box_select_exec(bContext *C, wmOperator *op) /* get the first report if none found */ if (report_min == NULL) { // printf("find_min\n"); - for (Report *report = reports->list.first; report; report = report->next) { + LISTBASE_FOREACH (Report *, report, &reports->list) { if (report->type & report_mask) { report_min = report; break; |