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>2021-06-30 07:35:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-30 07:39:32 +0300
commitc36d2a9a7a2a01fdaeea98270ef1eb2314dfada3 (patch)
tree1d48ecf6a1723e39b76ce46fcc0601d0d032a4d2 /source/blender/sequencer
parent77ac1f39c4c9ff2cdce2527ef0035beb749db610 (diff)
Cleanup: rename 'count' to 'len'
Reserve the term count for values that require calculation (typically linked lists). Without this convention it's difficult to know if using a length accessor function in a loop will be O(N^2) without inspecting the underlying implementation.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r--source/blender/sequencer/SEQ_iterator.h2
-rw-r--r--source/blender/sequencer/intern/iterator.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/sequencer/SEQ_iterator.h b/source/blender/sequencer/SEQ_iterator.h
index 39d8a7241fb..bdc5a093fbe 100644
--- a/source/blender/sequencer/SEQ_iterator.h
+++ b/source/blender/sequencer/SEQ_iterator.h
@@ -71,7 +71,7 @@ bool SEQ_iterator_ensure(SeqCollection *collection,
struct Sequence *SEQ_iterator_yield(SeqIterator *iterator);
SeqCollection *SEQ_collection_create(void);
-uint SEQ_collection_count(SeqCollection *collection);
+uint SEQ_collection_len(SeqCollection *collection);
bool SEQ_collection_append_strip(struct Sequence *seq, SeqCollection *data);
bool SEQ_collection_remove_strip(struct Sequence *seq, SeqCollection *data);
void SEQ_collection_free(SeqCollection *collection);
diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c
index 4df92ce7df4..dd343776200 100644
--- a/source/blender/sequencer/intern/iterator.c
+++ b/source/blender/sequencer/intern/iterator.c
@@ -117,7 +117,7 @@ SeqCollection *SEQ_collection_create(void)
/**
* Return number of items in collection.
*/
-uint SEQ_collection_count(SeqCollection *collection)
+uint SEQ_collection_len(SeqCollection *collection)
{
return BLI_gset_len(collection->set);
}