Cleanup: Use LISTBASE_FOREACH macro

Differential Revision: https://developer.blender.org/D9960
This commit is contained in:
Philipp Oeser 2020-12-30 15:25:13 +01:00
parent f910342c8d
commit 2be2165dd6
1 changed files with 2 additions and 5 deletions

View File

@ -803,14 +803,11 @@ void GPU_material_compile(GPUMaterial *mat)
void GPU_materials_free(Main *bmain)
{
Material *ma;
World *wo;
for (ma = bmain->materials.first; ma; ma = ma->id.next) {
LISTBASE_FOREACH (Material *, ma, &bmain->materials) {
GPU_material_free(&ma->gpumaterial);
}
for (wo = bmain->worlds.first; wo; wo = wo->id.next) {
LISTBASE_FOREACH (World *, wo, &bmain->worlds) {
GPU_material_free(&wo->gpumaterial);
}