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>2018-03-14 17:42:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-14 17:53:20 +0300
commit342593f1248c739a9f30c005ae710b9b9c7d0877 (patch)
treeff7e83900ff88ea3bd444b0f2321e436f89e7096 /source/blender/blenlib/intern/BLI_array.c
parentc22c2ff060a27bcd565f84233d2bbfa968b00a3f (diff)
Cleanup: rename BLI_array_count -> len
Match naming convention used everywhere else. Count should only be used when this isn't directly accessible.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_array.c')
-rw-r--r--source/blender/blenlib/intern/BLI_array.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenlib/intern/BLI_array.c b/source/blender/blenlib/intern/BLI_array.c
index f681d222e69..d16dd36763d 100644
--- a/source/blender/blenlib/intern/BLI_array.c
+++ b/source/blender/blenlib/intern/BLI_array.c
@@ -66,21 +66,23 @@
/**
* This function is only to be called via macros.
*
- * \note The caller must adjust \a arr_count
+ * \note The caller must adjust \a arr_len
*/
-void _bli_array_grow_func(void **arr_p, const void *arr_static,
- const int sizeof_arr_p, const int arr_count, const int num,
- const char *alloc_str)
+void _bli_array_grow_func(
+ void **arr_p, const void *arr_static,
+ const int sizeof_arr_p, const int arr_len, const int num,
+ const char *alloc_str)
{
void *arr = *arr_p;
void *arr_tmp;
- arr_tmp = MEM_mallocN(sizeof_arr_p *
- ((num < arr_count) ?
- (arr_count * 2 + 2) : (arr_count + num)), alloc_str);
+ arr_tmp = MEM_mallocN(
+ sizeof_arr_p *
+ ((num < arr_len) ?
+ (arr_len * 2 + 2) : (arr_len + num)), alloc_str);
if (arr) {
- memcpy(arr_tmp, arr, sizeof_arr_p * arr_count);
+ memcpy(arr_tmp, arr, sizeof_arr_p * arr_len);
if (arr != arr_static) {
MEM_freeN(arr);
@@ -91,6 +93,6 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
/* caller must do */
#if 0
- arr_count += num;
+ arr_len += num;
#endif
}