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/transform/transform_gizmo_3d.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/editors/transform/transform_gizmo_3d.c')
-rw-r--r-- | source/blender/editors/transform/transform_gizmo_3d.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index 6af1989a509..aa298b04d1a 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -800,7 +800,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C, /* calculate difference matrix */ BKE_gpencil_parent_matrix_get(depsgraph, ob, gpl, diff_mat); - for (bGPDstroke *gps = gpl->actframe->strokes.first; gps; gps = gps->next) { + LISTBASE_FOREACH (bGPDstroke *, gps, &gpl->actframe->strokes) { /* skip strokes that are invalid for current view */ if (ED_gpencil_stroke_can_use(C, gps) == false) { continue; @@ -883,7 +883,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C, if (use_mat_local) { mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat); } - for (EditBone *ebo = arm->edbo->first; ebo; ebo = ebo->next) { + LISTBASE_FOREACH (EditBone *, ebo, arm->edbo) { if (EBONE_VISIBLE(arm, ebo)) { if (ebo->flag & BONE_TIPSEL) { calc_tw_center_with_matrix(tbounds, ebo->tail, use_mat_local, mat_local); @@ -977,7 +977,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C, mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat); } - for (MetaElem *ml = mb->editelems->first; ml; ml = ml->next) { + LISTBASE_FOREACH (MetaElem *, ml, mb->editelems) { if (ml->flag & SELECT) { calc_tw_center_with_matrix(tbounds, &ml->x, use_mat_local, mat_local); totsel++; |