[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43647] trunk/blender/source/blender/ blenlib/BLI_array.h: BLI_array_reserve from bmesh.

Campbell Barton ideasman42 at gmail.com
Mon Jan 23 20:42:23 CET 2012


Revision: 43647
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43647
Author:   campbellbarton
Date:     2012-01-23 19:42:22 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
BLI_array_reserve from bmesh.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_array.h

Modified: trunk/blender/source/blender/blenlib/BLI_array.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_array.h	2012-01-23 19:32:00 UTC (rev 43646)
+++ trunk/blender/source/blender/blenlib/BLI_array.h	2012-01-23 19:42:22 UTC (rev 43647)
@@ -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);                                             \



More information about the Bf-blender-cvs mailing list