diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-27 21:30:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-27 23:24:06 +0300 |
commit | 84836e8952451228aaef6f79fbfbca9c48c8346e (patch) | |
tree | 0cc0d2e3b111983a3c933446e656884825b7a7f3 /source/blender | |
parent | ae7d84dbc1936ef7ddd00f9c22d074389f97f04f (diff) |
Cleanup: use strict flags
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/array_utils.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/array_utils.c b/source/blender/blenlib/intern/array_utils.c index efa107ed703..6c5dc5a7f1e 100644 --- a/source/blender/blenlib/intern/array_utils.c +++ b/source/blender/blenlib/intern/array_utils.c @@ -33,17 +33,20 @@ #include "BLI_utildefines.h" #include "BLI_alloca.h" +#include "BLI_strict_flags.h" + void _bli_array_reverse(void *arr_v, unsigned int arr_len, size_t arr_stride) { - const unsigned int arr_half_stride = (arr_len / 2) * arr_stride; + const unsigned int arr_stride_uint = (unsigned int)arr_stride; + const unsigned int arr_half_stride = (arr_len / 2) * arr_stride_uint; unsigned int i, i_end; char *arr = arr_v; char *buf = BLI_array_alloca(buf, arr_stride); - for (i = 0, i_end = (arr_len - 1) * arr_stride; + for (i = 0, i_end = (arr_len - 1) * arr_stride_uint; i < arr_half_stride; - i += arr_stride, i_end -= arr_stride) + i += arr_stride_uint, i_end -= arr_stride_uint) { memcpy(buf, &arr[i], arr_stride); memcpy(&arr[i], &arr[i_end], arr_stride); @@ -76,7 +79,7 @@ void _bli_array_permute( const unsigned int *order, void *arr_temp) { const size_t len = arr_len * arr_stride; - const unsigned int arr_stride_uint = arr_stride; + const unsigned int arr_stride_uint = (unsigned int)arr_stride; void *arr_orig; unsigned int i; |