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 <campbell@blender.org>2022-03-30 09:26:42 +0300
committerCampbell Barton <campbell@blender.org>2022-03-30 10:01:22 +0300
commita8ec7845e0bdb9e63e9d3dbd7f4cd7caad36b5a2 (patch)
tree4531232281ddc4cda4df3fb1ccc0822018fe5682 /source/blender/blenlib/intern/string.c
parentaf3aaf80344e745e6c207102941513cb631194c3 (diff)
Cleanup: use "num" as a suffix in: source/blender/blenlib
Also replace "num" with: - "number" when it's not used to denote the number of items. - "digits" when digits in a string are being manipulated.
Diffstat (limited to 'source/blender/blenlib/intern/string.c')
-rw-r--r--source/blender/blenlib/intern/string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 75fa628e701..74559751d91 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -1131,11 +1131,11 @@ void BLI_str_format_byte_unit(char dst[15], long long int bytes, const bool base
const int base = base_10 ? 1000 : 1024;
const char *units_base_10[] = {"B", "KB", "MB", "GB", "TB", "PB"};
const char *units_base_2[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB"};
- const int tot_units = ARRAY_SIZE(units_base_2);
+ const int units_num = ARRAY_SIZE(units_base_2);
BLI_STATIC_ASSERT(ARRAY_SIZE(units_base_2) == ARRAY_SIZE(units_base_10), "array size mismatch");
- while ((fabs(bytes_converted) >= base) && ((order + 1) < tot_units)) {
+ while ((fabs(bytes_converted) >= base) && ((order + 1) < units_num)) {
bytes_converted /= base;
order++;
}
@@ -1155,9 +1155,9 @@ void BLI_str_format_attribute_domain_size(char dst[7], int number_to_format)
int order = 0;
const float base = 1000;
const char *units[] = {"", "K", "M", "B"};
- const int tot_units = ARRAY_SIZE(units);
+ const int units_num = ARRAY_SIZE(units);
- while ((fabsf(number_to_format_converted) >= base) && ((order + 1) < tot_units)) {
+ while ((fabsf(number_to_format_converted) >= base) && ((order + 1) < units_num)) {
number_to_format_converted /= base;
order++;
}