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/windowmanager/gizmo/intern/wm_gizmo_type.c | |
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/windowmanager/gizmo/intern/wm_gizmo_type.c')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c index fe7de6739e1..3956ff8fd36 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c @@ -135,10 +135,10 @@ static void gizmotype_unlink(bContext *C, Main *bmain, wmGizmoType *gzt) { /* Free instances. */ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { - for (ScrArea *area = screen->areabase.first; area; area = area->next) { - for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { ListBase *lb = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase; - for (ARegion *region = lb->first; region; region = region->next) { + LISTBASE_FOREACH (ARegion *, region, lb) { wmGizmoMap *gzmap = region->gizmo_map; if (gzmap) { wmGizmoGroup *gzgroup; |