From a8ec7845e0bdb9e63e9d3dbd7f4cd7caad36b5a2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 30 Mar 2022 17:26:42 +1100 Subject: 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. --- source/blender/blenlib/BLI_utildefines_stack.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/blenlib/BLI_utildefines_stack.h') 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 -- cgit v1.2.3