From d138cbfb47e379edc1ee915a8c6ff65b01f000d6 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 3 Apr 2020 19:15:01 +0200 Subject: 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 --- source/blender/draw/intern/draw_cache_impl_volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/draw/intern/draw_cache_impl_volume.c') diff --git a/source/blender/draw/intern/draw_cache_impl_volume.c b/source/blender/draw/intern/draw_cache_impl_volume.c index c64817413b8..a7562b1b8ea 100644 --- a/source/blender/draw/intern/draw_cache_impl_volume.c +++ b/source/blender/draw/intern/draw_cache_impl_volume.c @@ -124,7 +124,7 @@ static void volume_batch_cache_clear(Volume *volume) return; } - for (DRWVolumeGrid *grid = cache->grids.first; grid; grid = grid->next) { + LISTBASE_FOREACH (DRWVolumeGrid *, grid, &cache->grids) { MEM_SAFE_FREE(grid->name); DRW_TEXTURE_FREE_SAFE(grid->texture); } -- cgit v1.2.3