From 99dc4ec69170a9a68e8ab20eede64bb88cba006f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 23 Jan 2012 19:42:22 +0000 Subject: BLI_array_reserve from bmesh. --- source/blender/blenlib/BLI_array.h | 4 ++++ 1 file changed, 4 insertions(+) (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 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); \ -- cgit v1.2.3