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/BLI_utildefines_stack.h
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/BLI_utildefines_stack.h')
-rw-r--r--source/blender/blenlib/BLI_utildefines_stack.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_utildefines_stack.h b/source/blender/blenlib/BLI_utildefines_stack.h
index fd5c3c72161..caf1726bbcf 100644
--- a/source/blender/blenlib/BLI_utildefines_stack.h
+++ b/source/blender/blenlib/BLI_utildefines_stack.h
@@ -11,17 +11,17 @@
/* only validate array-bounds in debug mode */
#ifdef DEBUG
-# define STACK_DECLARE(stack) unsigned int _##stack##_index, _##stack##_totalloc
-# define STACK_INIT(stack, tot) \
- ((void)stack, (void)((_##stack##_index) = 0), (void)((_##stack##_totalloc) = (tot)))
+# define STACK_DECLARE(stack) unsigned int _##stack##_index, _##stack##_num_alloc
+# define STACK_INIT(stack, stack_num) \
+ ((void)stack, (void)((_##stack##_index) = 0), (void)((_##stack##_num_alloc) = (stack_num)))
# define _STACK_SIZETEST(stack, off) \
- (BLI_assert((_##stack##_index) + (off) <= _##stack##_totalloc))
+ (BLI_assert((_##stack##_index) + (off) <= _##stack##_num_alloc))
# define _STACK_SWAP_TOTALLOC(stack_a, stack_b) \
- SWAP(unsigned int, _##stack_a##_totalloc, _##stack_b##_totalloc)
+ SWAP(unsigned int, _##stack_a##_num_alloc, _##stack_b##_num_alloc)
#else
# define STACK_DECLARE(stack) unsigned int _##stack##_index
-# define STACK_INIT(stack, tot) \
- ((void)stack, (void)((_##stack##_index) = 0), (void)(0 ? (tot) : 0))
+# define STACK_INIT(stack, stack_num) \
+ ((void)stack, (void)((_##stack##_index) = 0), (void)(0 ? (stack_num) : 0))
# define _STACK_SIZETEST(stack, off) (void)(stack), (void)(off)
# define _STACK_SWAP_TOTALLOC(stack_a, stack_b) (void)(stack_a), (void)(stack_b)
#endif