diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-23 23:42:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-23 23:42:22 +0400 |
commit | 99dc4ec69170a9a68e8ab20eede64bb88cba006f (patch) | |
tree | 36e288c79d7d2d0592cfa0bc12eadff6880df22c /source/blender/blenlib/BLI_array.h | |
parent | be0be0b1a9a8520f73cfdead9e1ae00c674b6233 (diff) |
BLI_array_reserve from bmesh.
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r-- | source/blender/blenlib/BLI_array.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index bd14793e0f9..a5453f1537b 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -140,6 +140,10 @@ (&arr[_##arr##_count - 1]) \ ) +#define BLI_array_reserve(arr, num) \ + BLI_array_growitems(arr, num), (void)(_##arr##_count -= num) + + #define BLI_array_free(arr) \ if (arr && (char *)arr != _##arr##_static) { \ BLI_array_fake_user(arr); \ |