diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-23 06:17:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-23 06:17:57 +0400 |
commit | 792f536b368067fd27d0eefbe1bf6c91123220f4 (patch) | |
tree | 125ac2b55c19bc3ea0ec49b684810cb983ffff4d /source/blender/blenlib | |
parent | 16ff7e40e66f93484695445b89090547de78d086 (diff) |
code cleanup: better use of BLI_array_* (grow in larger steps where possible), include BMO_iter_new in for loops.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_array.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index b5ef7eb853c..d66b8c009d7 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -69,7 +69,7 @@ /* this returns the entire size of the array, including any buffering. */ #define BLI_array_totalsize_dyn(arr) ( \ - ((arr)==NULL) ? \ + ((arr) == NULL) ? \ 0 : \ MEM_allocN_len(arr) / sizeof(*arr) \ ) @@ -151,9 +151,9 @@ } #define BLI_array_pop(arr) ( \ - (arr&&_##arr##_count) ? \ + (arr && _##arr##_count) ? \ arr[--_##arr##_count] : \ - 0 \ + NULL \ ) /* resets the logical size of an array to zero, but doesn't |