Cleanup: iterator macros
- put render iterator in own scope (would shadow it's own variable if used multiple times). - enforce semicolon at end of iterator macros. - no need to typedef one-off macro structs.
This commit is contained in:
@@ -138,7 +138,7 @@ bool render_result_has_views(struct RenderResult *rr);
|
||||
|
||||
#define FOREACH_VIEW_LAYER_TO_RENDER_END \
|
||||
} \
|
||||
}
|
||||
} ((void)0)
|
||||
|
||||
#endif /* __RENDER_RESULT_H__ */
|
||||
|
||||
|
||||
@@ -4016,7 +4016,7 @@ static void add_lightgroup(Render *re, Group *group, int exclusive)
|
||||
}
|
||||
}
|
||||
}
|
||||
FOREACH_GROUP_BASE_END
|
||||
FOREACH_GROUP_BASE_END;
|
||||
#else
|
||||
UNUSED_VARS(re, exclusive);
|
||||
#endif
|
||||
@@ -4950,7 +4950,7 @@ static void dupli_render_particle_set(const EvaluationContext *eval_ctx, Render
|
||||
{
|
||||
dupli_render_particle_set(eval_ctx, re, object, timeoffset, level+1, enable);
|
||||
}
|
||||
FOREACH_GROUP_OBJECT_END
|
||||
FOREACH_GROUP_OBJECT_END;
|
||||
}
|
||||
|
||||
static int get_vector_viewlayers(Scene *UNUSED(sce))
|
||||
@@ -4981,7 +4981,7 @@ static void add_group_render_dupli_obs(const EvaluationContext *eval_ctx, Render
|
||||
}
|
||||
}
|
||||
}
|
||||
FOREACH_GROUP_OBJECT_END
|
||||
FOREACH_GROUP_OBJECT_END;
|
||||
}
|
||||
|
||||
static void database_init_objects(const EvaluationContext *eval_ctx, Render *re, unsigned int UNUSED(renderlay),
|
||||
|
||||
@@ -255,7 +255,7 @@ static void env_set_imats(Render *re)
|
||||
mul_m4_m4m4(mat, re->viewmat, ob->obmat);
|
||||
invert_m4_m4(ob->imat, mat);
|
||||
}
|
||||
FOREACH_SCENE_OBJECT_END
|
||||
FOREACH_SCENE_OBJECT_END;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
@@ -771,7 +771,7 @@ int RE_engine_render(Render *re, int do_all)
|
||||
DEG_graph_free(depsgraph);
|
||||
DEG_evaluation_context_free(eval_ctx);
|
||||
}
|
||||
FOREACH_VIEW_LAYER_TO_RENDER_END
|
||||
FOREACH_VIEW_LAYER_TO_RENDER_END;
|
||||
}
|
||||
|
||||
engine->tile_x = 0;
|
||||
|
||||
@@ -2043,7 +2043,7 @@ static void tag_dependend_objects_for_render(Scene *scene, int UNUSED(renderlay)
|
||||
}
|
||||
}
|
||||
}
|
||||
FOREACH_OBJECT_RENDERABLE_END
|
||||
FOREACH_OBJECT_RENDERABLE_END;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf
|
||||
#undef RENDER_LAYER_ADD_PASS_SAFE
|
||||
}
|
||||
}
|
||||
FOREACH_VIEW_LAYER_TO_RENDER_END
|
||||
FOREACH_VIEW_LAYER_TO_RENDER_END;
|
||||
|
||||
/* sss, previewrender and envmap don't do layers, so we make a default one */
|
||||
if (BLI_listbase_is_empty(&rr->layers) && !(layername && layername[0])) {
|
||||
|
||||
Reference in New Issue
Block a user