From 8fa17c5362a09d023bda999d4595f1762e5f52b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 7 Apr 2012 12:37:15 +0000 Subject: code cleanup: no functional changes - memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead. - quiet warnings in editmesh_slide.c - cleanup comments in bmesh and some other minor comment additions. --- source/blender/blenlib/BLI_array.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/blenlib/BLI_array.h') diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index a8a7cf39066..b5ef7eb853c 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -64,7 +64,7 @@ #define BLI_array_staticdeclare(arr, maxstatic) \ int _##arr##_count = 0; \ void *_##arr##_tmp; \ - char _##arr##_static[maxstatic*sizeof(arr)] + char _##arr##_static[maxstatic * sizeof(arr)] /* this returns the entire size of the array, including any buffering. */ @@ -117,8 +117,8 @@ /* grow an array by a specified number of items */ #define BLI_array_growitems(arr, num) ( \ - ((void *)(arr)==NULL && (void *)(_##arr##_static) != NULL) ? \ - ((arr= (void*)_##arr##_static), (_##arr##_count += num)) : \ + ((void *)(arr) == NULL && (void *)(_##arr##_static) != NULL) ? \ + ((arr = (void*)_##arr##_static), (_##arr##_count += num)) : \ _bli_array_grow_items(arr, num) \ ) @@ -141,7 +141,7 @@ ) #define BLI_array_reserve(arr, num) \ - BLI_array_growitems(arr, num), (void)(_##arr##_count -= num) + BLI_array_growitems(arr, num), (void)(_##arr##_count -= (num)) #define BLI_array_free(arr) \ @@ -159,7 +159,7 @@ /* 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 /* 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. */ @@ -177,9 +177,9 @@ * same purpose as BLI_array_staticdeclare() * but use when the max size is known ahead of time */ #define BLI_array_fixedstack_declare(arr, maxstatic, realsize, allocstr) \ - char _##arr##_static[maxstatic*sizeof(*(arr))]; \ - const int _##arr##_is_static= ((void *)_##arr##_static) != ( \ - arr= ((realsize) <= maxstatic) ? \ + char _##arr##_static[maxstatic * sizeof(*(arr))]; \ + const int _##arr##_is_static = ((void *)_##arr##_static) != ( \ + arr = ((realsize) <= maxstatic) ? \ (void *)_##arr##_static : \ MEM_mallocN(sizeof(*(arr)) * (realsize), allocstr) \ ) \ -- cgit v1.2.3