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-04-28 19:14:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-28 19:14:16 +0400
commitef054e165cad35715a5b2388aac3db68a65ea275 (patch)
tree0726e9c5a28962839a8d36ba4647f0b76fff7ad2 /source/blender/blenlib/BLI_array.h
parent887d1533f81b0ee89975efd8162a011b99c976af (diff)
style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros.
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r--source/blender/blenlib/BLI_array.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index dac0143b5b6..7069732eeb6 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -44,7 +44,7 @@
* int i;
*
* for (i=0; i<10; i++) {
- * BLI_array_growone(arr);
+ * BLI_array_grow_one(arr);
* arr[i] = something;
* }
* BLI_array_free(arr);
@@ -116,32 +116,32 @@
)
/* grow an array by a specified number of items */
-#define BLI_array_growitems(arr, num) ( \
+#define BLI_array_grow_items(arr, num) ( \
((void *)(arr) == NULL && (void *)(_##arr##_static) != NULL) ? \
((arr = (void*)_##arr##_static), (_##arr##_count += num)) : \
_bli_array_grow_items(arr, num) \
)
/* returns length of array */
-#define BLI_array_growone(arr) BLI_array_growitems(arr, 1)
+#define BLI_array_grow_one(arr) BLI_array_grow_items(arr, 1)
/* appends an item to the array. */
#define BLI_array_append(arr, item) ( \
- (void) BLI_array_growone(arr), \
+ (void) BLI_array_grow_one(arr), \
(void) (arr[_##arr##_count - 1] = item) \
)
/* appends an item to the array and returns a pointer to the item in the array.
* item is not a pointer, but actual data value.*/
#define BLI_array_append_r(arr, item) ( \
- (void) BLI_array_growone(arr), \
+ (void) BLI_array_grow_one(arr), \
(void) (arr[_##arr##_count - 1] = item), \
(&arr[_##arr##_count - 1]) \
)
#define BLI_array_reserve(arr, num) \
- BLI_array_growitems(arr, num), (void)(_##arr##_count -= (num))
+ BLI_array_grow_items(arr, num), (void)(_##arr##_count -= (num))
#define BLI_array_free(arr) \
@@ -163,7 +163,7 @@
/* set the count of the array, doesn't actually increase the allocated array
* size. don't use this unless you know what you're doing. */
-#define BLI_array_set_length(arr, count) \
+#define BLI_array_length_set(arr, count) \
_##arr##_count = (count)
/* only to prevent unused warnings */