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>2013-07-28 21:06:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-28 21:06:31 +0400
commitfc4a7775112045c604bef0eacbe1dc3cc609d0f3 (patch)
tree33558d967b181b8b89f00fe4e55f3c35e2033d44 /source/blender/blenlib/BLI_array.h
parentb8e06518c9626fcf3791a00fecb88cb6b3902947 (diff)
use '_exec' suffix for operator execute callbacks, also picky change to sizeof() use in BLI_array.h
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r--source/blender/blenlib/BLI_array.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index c7b8521f9fa..ef5cb8bde04 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -40,11 +40,11 @@
#define _bli_array_totalsize_dynamic(arr) ( \
((arr) == NULL) ? \
0 : \
- MEM_allocN_len(arr) / sizeof(*arr) \
+ MEM_allocN_len(arr) / sizeof(*(arr)) \
)
#define _bli_array_totalsize_static(arr) \
- (sizeof(_##arr##_static) / sizeof(*arr))
+ (sizeof(_##arr##_static) / sizeof(*(arr)))
#define _bli_array_totalsize(arr) ( \
(size_t) \
@@ -66,9 +66,9 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
/* -------------------------------------------------------------------- */
/* public defines */
-/* use sizeof(*arr) to ensure the array exists and is an array */
+/* use sizeof(*(arr)) to ensure the array exists and is an array */
#define BLI_array_declare(arr) \
- int _##arr##_count = ((void)(sizeof(*arr)), 0); \
+ int _##arr##_count = ((void)(sizeof(*(arr))), 0); \
void *_##arr##_static = NULL
/* this will use stack space, up to maxstatic array elements, before
@@ -96,7 +96,7 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
(LIKELY(_bli_array_totalsize(arr) >= _##arr##_count + num) ? \
(void)0 /* do nothing */ : \
_bli_array_grow_func((void **)&(arr), _##arr##_static, \
- sizeof(*arr), _##arr##_count, num, \
+ sizeof(*(arr)), _##arr##_count, num, \
"BLI_array." #arr), \
(void)0) /* msvc2008 needs this */ \
), \