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>2012-08-09 01:20:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-09 01:20:10 +0400
commit0107385f7f846bb3f8ad97fed1fb13b8b9a4405e (patch)
tree8dd50830246be296ac16e8cab1d1c19268b8747e /source/blender/blenlib/BLI_array.h
parent5e0f254afa8caed1febbe02130cc313a53149efe (diff)
code cleanup: ensure macros require ';' endings
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r--source/blender/blenlib/BLI_array.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index 18258014529..32c2d5b9dc7 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -151,7 +151,7 @@
if (arr && (char *)arr != _##arr##_static) { \
BLI_array_fake_user(arr); \
MEM_freeN(arr); \
- }
+ } (void)0
#define BLI_array_pop(arr) ( \
(arr && _##arr##_count) ? \
@@ -162,12 +162,12 @@
/* resets the logical size of an array to zero, but doesn't
* free the memory. */
#define BLI_array_empty(arr) \
- _##arr##_count = 0
+ _##arr##_count = 0; (void)0
/* set the count of the array, doesn't actually increase the allocated array
* size. don't use this unless you know what you're doing. */
#define BLI_array_length_set(arr, count) \
- _##arr##_count = (count)
+ _##arr##_count = (count); (void)0
/* only to prevent unused warnings */
#define BLI_array_fake_user(arr) \
@@ -187,5 +187,7 @@
MEM_mallocN(sizeof(*(arr)) * (realsize), allocstr) \
) \
-#define BLI_array_fixedstack_free(arr) \
- if (_##arr##_is_static) MEM_freeN(arr)
+#define BLI_array_fixedstack_free(arr) \
+ if (_##arr##_is_static) { \
+ MEM_freeN(arr); \
+ } (void)0