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-02-15 15:36:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-15 15:39:08 +0300
commitccdacf1c9b31b15e188aa9e9adb044ffd0ca0da4 (patch)
tree086fc08c0a7d7ecefb4ed6666a3c2fd813142c8b /source/blender/editors/space_outliner/outliner_tree.c
parent4da6c496137042d4c90292f5567a6702a3df3323 (diff)
Cleanup: use '_len' instead of '_size' w/ BLI API
- When returning the number of items in a collection use BLI_*_len() - Keep _size() for size in bytes. - Keep _count() for data structures that don't store length (hint this isn't a simple getter). See P611 to apply instead of manually resolving conflicts.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index cf77afa32c4..051605b1079 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -113,7 +113,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
if (unused) {
- if (BLI_mempool_count(ts) == unused) {
+ if (BLI_mempool_len(ts) == unused) {
BLI_mempool_destroy(ts);
soops->treestore = NULL;
if (soops->treehash) {
@@ -123,7 +123,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
else {
TreeStoreElem *tsenew;
- BLI_mempool *new_ts = BLI_mempool_create(sizeof(TreeStoreElem), BLI_mempool_count(ts) - unused,
+ BLI_mempool *new_ts = BLI_mempool_create(sizeof(TreeStoreElem), BLI_mempool_len(ts) - unused,
512, BLI_MEMPOOL_ALLOW_ITER);
BLI_mempool_iternew(ts, &iter);
while ((tselem = BLI_mempool_iterstep(&iter))) {
@@ -1635,7 +1635,7 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
Base *base;
TreeElement *te = NULL, *ten;
TreeStoreElem *tselem;
- int show_opened = !soops->treestore || !BLI_mempool_count(soops->treestore); /* on first view, we open scenes */
+ int show_opened = !soops->treestore || !BLI_mempool_len(soops->treestore); /* on first view, we open scenes */
/* Are we looking for something - we want to tag parents to filter child matches
* - NOT in datablocks view - searching all datablocks takes way too long to be useful