diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-06 05:05:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-06 05:09:52 +0300 |
commit | 3382b07ad6cfbb117cf8ec8fc95aa46cf585237e (patch) | |
tree | e202bacdebb7808b0dfa73469fdc00570a2abd3f /source/blender/bmesh/intern/bmesh_iterators.c | |
parent | 432bfbf7a3b74943b1c251c12bd76616da23991f (diff) |
Cleanup: rename 'count' to 'len'
Reserve the term count for values that require calculation
(typically linked lists).
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_iterators.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_iterators.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/bmesh/intern/bmesh_iterators.c b/source/blender/bmesh/intern/bmesh_iterators.c index ff6274cff12..bd28022de4b 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.c +++ b/source/blender/bmesh/intern/bmesh_iterators.c @@ -221,21 +221,21 @@ void *BMO_iter_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], { BMOIter iter; BMElem *ele; - int count = BMO_slot_buffer_count(slot_args, slot_name); + const int slot_len = BMO_slot_buffer_len(slot_args, slot_name); BLI_assert(stack_array_size == 0 || (stack_array_size && stack_array)); - if ((ele = BMO_iter_new(&iter, slot_args, slot_name, restrictmask)) && count > 0) { - BMElem **array = count > stack_array_size ? MEM_mallocN(sizeof(ele) * count, __func__) : - stack_array; + if ((ele = BMO_iter_new(&iter, slot_args, slot_name, restrictmask)) && slot_len > 0) { + BMElem **array = slot_len > stack_array_size ? MEM_mallocN(sizeof(ele) * slot_len, __func__) : + stack_array; int i = 0; do { array[i++] = ele; } while ((ele = BMO_iter_step(&iter))); - BLI_assert(i <= count); + BLI_assert(i <= slot_len); - if (i != count) { + if (i != slot_len) { if ((void **)array != stack_array) { array = MEM_reallocN(array, sizeof(ele) * i); } |