Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2022-06-07 11:31:28 +0300
committerSergey Sharybin <sergey@blender.org>2022-06-07 11:35:33 +0300
commitdcbbdc89ead67a1436d565d22f07335881162730 (patch)
treeb3f5b0685a9bfec5afdd410bfedf1c019295b014
parent9ccc21dde372d57fa841a494d72527b30d2948d2 (diff)
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.
-rw-r--r--source/blender/draw/intern/draw_cache_extract.hh4
1 files changed, 2 insertions, 2 deletions
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 *))