[Bf-blender-cvs] [9b4eb0739b3] greasepencil-edit-curve: GPencil: Replace loops by FOREACH macro

Antonio Vazquez noreply at git.blender.org
Sun Jun 14 12:39:19 CEST 2020


Commit: 9b4eb0739b37f8b30630c997ea799db462aefd22
Author: Antonio Vazquez
Date:   Sun Jun 14 12:39:11 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rB9b4eb0739b37f8b30630c997ea799db462aefd22

GPencil: Replace loops by FOREACH macro

===================================================================

M	source/blender/blenkernel/intern/gpencil_curve.c

===================================================================

diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c
index 366cc91cabc..5566fe03402 100644
--- a/source/blender/blenkernel/intern/gpencil_curve.c
+++ b/source/blender/blenkernel/intern/gpencil_curve.c
@@ -555,14 +555,14 @@ void BKE_gpencil_selected_strokes_editcurve_update(bGPdata *gpd)
 
   const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd);
 
-  for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
+  LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
     if (!BKE_gpencil_layer_is_editable(gpl)) {
       continue;
     }
     bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
     for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
       if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && is_multiedit)) {
-        for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
+        LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
           /* skip deselected stroke */
           if (!(gps->flag & GP_STROKE_SELECT)) {
             continue;



More information about the Bf-blender-cvs mailing list