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>2014-05-19 12:00:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-19 12:00:20 +0400
commitf8278e5479a56d7742e820821ab16c5c3c3fab75 (patch)
tree795b0691f56091a998fee80c5cdaf751c6ebe7a2 /source/blender/blenlib/BLI_utildefines.h
parent875aff2a9a832d162141e1f6a39f9d08c46912b7 (diff)
Correct ARRAY_SIZE macro and make doxy comments consistent
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r--source/blender/blenlib/BLI_utildefines.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 20ed2e06714..af192d13369 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -362,12 +362,12 @@
} (void)0
/* assuming a static array */
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__cplusplus)
# define ARRAY_SIZE(arr) \
((sizeof(struct {int isnt_array : ((void *)&(arr) == &(arr)[0]);}) * 0) + \
(sizeof(arr) / sizeof(*(arr))))
#else
-# define ARRAY_SIZE(x) sizeof(arr) / sizeof(*(arr))
+# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*(arr)))
#endif
/* Warning-free macros for storing ints in pointers. Use these _only_