From d138cbfb47e379edc1ee915a8c6ff65b01f000d6 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 3 Apr 2020 19:15:01 +0200 Subject: 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 --- source/blender/modifiers/intern/MOD_dynamicpaint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/modifiers') diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index d9fe2504e22..d36fce3752b 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -124,8 +124,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; /* Add relation from canvases to all brush objects. */ if (pmd->canvas != NULL && pmd->type == MOD_DYNAMICPAINT_TYPE_CANVAS) { - for (DynamicPaintSurface *surface = pmd->canvas->surfaces.first; surface; - surface = surface->next) { + LISTBASE_FOREACH (DynamicPaintSurface *, surface, &pmd->canvas->surfaces) { if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP) { DEG_add_forcefield_relations( ctx->node, ctx->object, surface->effector_weights, true, 0, "Dynamic Paint Field"); -- cgit v1.2.3