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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user