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>2014-07-16 05:11:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-16 05:12:19 +0400
commitb26daac398b6dddaeecb6885b5e6f388e7f2e931 (patch)
treedb3ef7a722c07ebc0ef3dede2ba074a555c08a07 /source/blender/blenlib/intern/stack.c
parent1ae11f71ff6f076ebc428dc949c5b2a0339aa1e4 (diff)
BLI_kdopbvh: assert for bad input
also hint UNLIKELY branches
Diffstat (limited to 'source/blender/blenlib/intern/stack.c')
-rw-r--r--source/blender/blenlib/intern/stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/stack.c b/source/blender/blenlib/intern/stack.c
index 9d6eecdba55..58029120de9 100644
--- a/source/blender/blenlib/intern/stack.c
+++ b/source/blender/blenlib/intern/stack.c
@@ -185,7 +185,7 @@ void BLI_stack_pop(BLI_Stack *stack, void *dst)
#ifdef USE_TOTELEM
stack->totelem--;
#endif
- if (--stack->chunk_index == CHUNK_EMPTY) {
+ if (UNLIKELY(--stack->chunk_index == CHUNK_EMPTY)) {
struct StackChunk *chunk_free;
chunk_free = stack->chunk_curr;