Cleanup: multistatement-macros warning

This commit is contained in:
Campbell Barton 2017-07-29 08:18:20 +10:00
parent 214bbd4c02
commit 393ba0cf16
2 changed files with 6 additions and 4 deletions

@ -135,11 +135,12 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
#define BLI_array_append_ret(arr) \
(BLI_array_reserve(arr, 1), &arr[(_##arr##_count++)])
#define BLI_array_free(arr) \
#define BLI_array_free(arr) { \
if (arr && (char *)arr != _##arr##_static) { \
BLI_array_fake_user(arr); \
MEM_freeN(arr); \
} (void)0
} \
} ((void)0)
#define BLI_array_pop(arr) ( \
(arr && _##arr##_count) ? \

@ -44,13 +44,14 @@
# define BM_CHECK_ELEMENT(el) (void)(el)
#else
int bmesh_elem_check(void *element, const char htype);
# define BM_CHECK_ELEMENT(el) \
# define BM_CHECK_ELEMENT(el) { \
if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
printf("check_element failure, with code %i on line %i in file\n" \
" \"%s\"\n\n", \
bmesh_elem_check(el, ((BMHeader *)el)->htype), \
__LINE__, __FILE__); \
} (void)0
} \
} ((void)0)
#endif
int bmesh_radial_length(const BMLoop *l);