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:
authorHoward Trickey <howard.trickey@gmail.com>2019-08-30 18:25:50 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-08-30 18:39:27 +0300
commitbb8a9a6f8b8978fa1bf6567b4f9cd49dc9cf8662 (patch)
treeb23ebb75d7e44727df2862d8ac1f1dac01e59a6b
parent8cd0da88e55a0c0f88297a5f0f770eb40acc6219 (diff)
Fix BLI_array macro so can use BLI_strict_flags.h.
Was doing int comparision against size_t, so added casts.
-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 a61eff7329e..d687838a896 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -83,9 +83,9 @@ void _bli_array_grow_func(void **arr_p,
((void *)(_##arr##_static) != \
NULL) && /* don't add _##arr##_len below because it must be zero */ \
(_bli_array_totalsize_static(arr) >= \
- _##arr##_len + (num))) ? /* we have an empty array and a static var big enough */ \
+ (size_t)(_##arr##_len + (num)))) ? /* we have an empty array and a static var big enough */ \
(void)(arr = (void *)_##arr##_static) : /* use existing static array or allocate */ \
- (LIKELY(_bli_array_totalsize(arr) >= _##arr##_len + (num)) ? \
+ (LIKELY(_bli_array_totalsize(arr) >= (size_t)(_##arr##_len + (num))) ? \
(void)0 /* do nothing */ : \
_bli_array_grow_func((void **)&(arr), \
_##arr##_static, \