[Bf-blender-cvs] [dcbbdc89ead] master: Cleanup: Fix missing-braces warning in draw manager
Sergey Sharybin
noreply at git.blender.org
Tue Jun 7 10:36:31 CEST 2022
Commit: dcbbdc89ead67a1436d565d22f07335881162730
Author: Sergey Sharybin
Date: Tue Jun 7 10:31:28 2022 +0200
Branches: master
https://developer.blender.org/rBdcbbdc89ead67a1436d565d22f07335881162730
Cleanup: Fix missing-braces warning in draw manager
Good side effect of the change is that it makes it so that the
size of an array is more likely to be calculated at a compile time.
More ideally we'll be using bli::Array instead of the bare array,
but that is outside of the scope of this change.
===================================================================
M source/blender/draw/intern/draw_cache_extract.hh
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_extract.hh b/source/blender/draw/intern/draw_cache_extract.hh
index 94118be615c..c7127d169e1 100644
--- a/source/blender/draw/intern/draw_cache_extract.hh
+++ b/source/blender/draw/intern/draw_cache_extract.hh
@@ -196,8 +196,8 @@ struct MeshBatchList {
};
#define MBC_BATCH_LEN (sizeof(MeshBatchList) / sizeof(void *))
-#define MBC_VBO_LEN (sizeof((MeshBufferList{0}).vbo) / sizeof(void *))
-#define MBC_IBO_LEN (sizeof((MeshBufferList{0}).ibo) / sizeof(void *))
+#define MBC_VBO_LEN (sizeof(MeshBufferList::vbo) / sizeof(void *))
+#define MBC_IBO_LEN (sizeof(MeshBufferList::ibo) / sizeof(void *))
#define MBC_BATCH_INDEX(batch) (offsetof(MeshBatchList, batch) / sizeof(void *))
More information about the Bf-blender-cvs
mailing list