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/gpu/intern/gpu_select_pick.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/gpu/intern/gpu_select_pick.c') diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 56fe1e40d87..674ca06d109 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -731,8 +731,7 @@ void gpu_select_pick_cache_load_id(void) #ifdef DEBUG_PRINT printf("%s (building depth from cache)\n", __func__); #endif - for (DepthBufCache *rect_depth = ps->cache.bufs.first; rect_depth; - rect_depth = rect_depth->next) { + LISTBASE_FOREACH (DepthBufCache *, rect_depth, &ps->cache.bufs) { if (rect_depth->next != NULL) { /* we know the buffers differ, but this sub-region may not. * double check before adding an id-pass */ -- cgit v1.2.3