diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-14 09:58:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-14 10:00:42 +0300 |
commit | 43ee4d5d7c6743de6048658354ebaa202f23054d (patch) | |
tree | 4e4e609e56709a74c4c3f1910faaf6fb3e6a6b69 | |
parent | c1d737eb95455540e33f090a70645354aa04491f (diff) |
Cleanup: quiet GCC -Wtype-limits
While the warning can normally be disabled, we don't have have as much
control of warnings when macros are used.
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 5af97ebb411..c0b76aa9cbf 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -385,7 +385,7 @@ extern "C" { */ #define ARRAY_DELETE(arr, index, delete_len, arr_len) \ { \ - BLI_assert(((index) >= 0) && ((index) + delete_len <= arr_len)); \ + BLI_assert((&arr[index] >= arr) && ((index) + delete_len <= arr_len)); \ memmove(&(arr)[index], \ &(arr)[(index) + (delete_len)], \ (((arr_len) - (index)) - (delete_len)) * sizeof(*(arr))); \ @@ -400,7 +400,7 @@ extern "C" { */ #define ARRAY_DELETE_REORDER_LAST(arr, index, delete_len, arr_len) \ { \ - BLI_assert(((index) >= 0) && ((index) + delete_len <= arr_len)); \ + BLI_assert((&arr[index] >= arr) && ((index) + delete_len <= arr_len)); \ if ((index) + (delete_len) != (arr_len)) { \ if (((delete_len) == 1) || ((delete_len) <= ((arr_len) - ((index) + (delete_len))))) { \ memcpy(&(arr)[index], \ |