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/blenkernel/intern/effect.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/blenkernel/intern/effect.c')
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 984a7a12b94..e1e818a5a34 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -247,7 +247,7 @@ ListBase *BKE_effector_relations_create(Depsgraph *depsgraph, add_effector_relation(relations, ob, NULL, ob->pd); } - for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) { + LISTBASE_FOREACH (ParticleSystem *, psys, &ob->particlesystem) { ParticleSettings *part = psys->part; if (psys_check_enabled(ob, psys, for_render)) { @@ -286,7 +286,7 @@ ListBase *BKE_effectors_create(Depsgraph *depsgraph, return NULL; } - for (EffectorRelation *relation = relations->first; relation; relation = relation->next) { + LISTBASE_FOREACH (EffectorRelation *, relation, relations) { /* Get evaluated object. */ Object *ob = (Object *)DEG_get_evaluated_id(depsgraph, &relation->ob->id); @@ -329,7 +329,7 @@ ListBase *BKE_effectors_create(Depsgraph *depsgraph, void BKE_effectors_free(ListBase *lb) { if (lb) { - for (EffectorCache *eff = lb->first; eff; eff = eff->next) { + LISTBASE_FOREACH (EffectorCache *, eff, lb) { if (eff->guide_data) { MEM_freeN(eff->guide_data); } |