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:
authorCampbell Barton <ideasman42@gmail.com>2020-08-08 07:06:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-08 07:08:37 +0300
commita1d57e3f05f1602a07698e19f97f861d41f14775 (patch)
tree09d993cceed4d37c6d6a89ecd8aa764424aa0966 /source/blender/blenkernel/intern/unit.c
parent171e77c3c25a1224fc5f7db40ec6f8879f8dbbb0 (diff)
Cleanup: replace sizeof division with ARRAY_SIZE macro
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r--source/blender/blenkernel/intern/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index b8d86f0dc5b..8414f93ddaa 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -130,7 +130,7 @@ typedef struct bUnitCollection {
/* Keep table lignment. */
/* clang-format off */
-#define UNIT_COLLECTION_LENGTH(def) (sizeof(def) / sizeof(bUnitDef) - 1)
+#define UNIT_COLLECTION_LENGTH(def) (ARRAY_SIZE(def) - 1)
#define NULL_UNIT {NULL, NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
/* Dummy */