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:
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r--source/blender/blenlib/BLI_array.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index 6d34b0d48d5..7c8816cb58a 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -106,8 +106,8 @@
((arr = (void *)_##arr##_static), (_##arr##_count += (num))) \
: \
/* use existing static array or allocate */ \
- ((BLI_array_totalsize(arr) >= _##arr##_count + num) ? \
- (_##arr##_count += num) : \
+ (LIKELY(BLI_array_totalsize(arr) >= _##arr##_count + num) ? \
+ (_##arr##_count += num) : /* UNLIKELY --> realloc */ \
( \
(void) (_##arr##_tmp = MEM_callocN( \
sizeof(*arr) * (num < _##arr##_count ? \