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
This commit is contained in:
2020-04-03 19:15:01 +02:00
parent b0c1184875
commit d138cbfb47
207 changed files with 1174 additions and 1251 deletions

View File

@@ -2187,7 +2187,7 @@ void EEVEE_particle_hair_cache_populate(EEVEE_Data *vedata,
if (ob->type == OB_MESH) {
if (ob != draw_ctx->object_edit) {
for (ModifierData *md = ob->modifiers.first; md; md = md->next) {
LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
if (md->type != eModifierType_ParticleSystem) {
continue;
}

View File

@@ -852,7 +852,7 @@ void EEVEE_volumes_resolve(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *veda
void EEVEE_volumes_free_smoke_textures(void)
{
/* Free Smoke Textures after rendering */
for (LinkData *link = e_data.smoke_domains.first; link; link = link->next) {
LISTBASE_FOREACH (LinkData *, link, &e_data.smoke_domains) {
FluidModifierData *mmd = (FluidModifierData *)link->data;
GPU_free_smoke(mmd);
}