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.
This commit is contained in:
2018-02-15 23:36:11 +11:00
parent 4da6c49613
commit ccdacf1c9b
75 changed files with 192 additions and 192 deletions

View File

@@ -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;
}