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/bmesh | |
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/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 4 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index d33f4e0a1d6..1bf419f4461 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -1083,12 +1083,12 @@ void BM_select_history_merge_from_targetmap( { #ifdef DEBUG - for (BMEditSelection *ese = bm->selected.first; ese; ese = ese->next) { + LISTBASE_FOREACH (BMEditSelection *, ese, &bm->selected) { BLI_assert(BM_ELEM_API_FLAG_TEST(ese->ele, _FLAG_OVERLAP) == 0); } #endif - for (BMEditSelection *ese = bm->selected.first; ese; ese = ese->next) { + LISTBASE_FOREACH (BMEditSelection *, ese, &bm->selected) { BM_ELEM_API_FLAG_ENABLE(ese->ele, _FLAG_OVERLAP); /* Only loop when (use_chain == true). */ diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index ff618142bfa..933223c3337 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -2593,7 +2593,7 @@ void BM_mesh_rebuild(BMesh *bm, } } - for (BMEditSelection *ese = bm->selected.first; ese; ese = ese->next) { + LISTBASE_FOREACH (BMEditSelection *, ese, &bm->selected) { switch (ese->htype) { case BM_VERT: if (remap & BM_VERT) { |