[Bf-blender-cvs] [899935d5d02] master: Fix wrong usage of 'sizeof'

Germano Cavalcante noreply at git.blender.org
Mon Aug 16 01:09:33 CEST 2021


Commit: 899935d5d02463187617d1adc5f0c0f41fe56265
Author: Germano Cavalcante
Date:   Sun Aug 15 20:07:25 2021 -0300
Branches: master
https://developer.blender.org/rB899935d5d02463187617d1adc5f0c0f41fe56265

Fix wrong usage of 'sizeof'

The intention was to use `ARRAY_SIZE`.

No functional changes.

===================================================================

M	source/blender/draw/intern/draw_cache_impl_mesh.c

===================================================================

diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 86c14330409..52b76733b78 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -215,7 +215,7 @@ static const DRWBatchFlag g_buffer_deps[] = {
 };
 
 #ifndef NDEBUG
-static DRWBatchFlag g_buffer_deps_d[sizeof(g_buffer_deps)] = {0};
+static DRWBatchFlag g_buffer_deps_d[ARRAY_SIZE(g_buffer_deps)] = {0};
 #endif
 
 static void mesh_batch_cache_discard_surface_batches(MeshBatchCache *cache);



More information about the Bf-blender-cvs mailing list