Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-23 23:42:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-23 23:42:22 +0400
commit99dc4ec69170a9a68e8ab20eede64bb88cba006f (patch)
tree36e288c79d7d2d0592cfa0bc12eadff6880df22c /source/blender/blenlib/BLI_array.h
parentbe0be0b1a9a8520f73cfdead9e1ae00c674b6233 (diff)
BLI_array_reserve from bmesh.
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r--source/blender/blenlib/BLI_array.h4
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); \