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/blenlib/intern/array_store.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/blenlib/intern/array_store.c')
-rw-r--r--source/blender/blenlib/intern/array_store.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c
index 5b1715bbb3d..acf15b1c892 100644
--- a/source/blender/blenlib/intern/array_store.c
+++ b/source/blender/blenlib/intern/array_store.c
@@ -1759,7 +1759,7 @@ bool BLI_array_store_is_valid(
goto user_finally;
}
}
- if (!(BLI_mempool_count(bs->memory.chunk_list) == (int)BLI_ghash_size(chunk_list_map))) {
+ if (!(BLI_mempool_len(bs->memory.chunk_list) == (int)BLI_ghash_len(chunk_list_map))) {
ok = false;
goto user_finally;
}
@@ -1772,11 +1772,11 @@ bool BLI_array_store_is_valid(
totrefs += 1;
}
}
- if (!(BLI_mempool_count(bs->memory.chunk) == (int)BLI_ghash_size(chunk_map))) {
+ if (!(BLI_mempool_len(bs->memory.chunk) == (int)BLI_ghash_len(chunk_map))) {
ok = false;
goto user_finally;
}
- if (!(BLI_mempool_count(bs->memory.chunk_ref) == totrefs)) {
+ if (!(BLI_mempool_len(bs->memory.chunk_ref) == totrefs)) {
ok = false;
goto user_finally;
}