[Bf-blender-cvs] [2be2165dd64] master: Cleanup: Use LISTBASE_FOREACH macro
Philipp Oeser
noreply at git.blender.org
Wed Dec 30 17:04:26 CET 2020
Commit: 2be2165dd6478eff51291e2c173bd91f5d720c6d
Author: Philipp Oeser
Date: Wed Dec 30 15:25:13 2020 +0100
Branches: master
https://developer.blender.org/rB2be2165dd6478eff51291e2c173bd91f5d720c6d
Cleanup: Use LISTBASE_FOREACH macro
Differential Revision: https://developer.blender.org/D9960
===================================================================
M 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);
}
More information about the Bf-blender-cvs
mailing list