From 2be2165dd6478eff51291e2c173bd91f5d720c6d Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 30 Dec 2020 15:25:13 +0100 Subject: Cleanup: Use LISTBASE_FOREACH macro Differential Revision: https://developer.blender.org/D9960 --- source/blender/gpu/intern/gpu_material.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source/blender/gpu/intern/gpu_material.c') diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 3f22424c7c9..675036b31c3 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -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); } -- cgit v1.2.3