diff options
author | Kaloyan Donev <kdonev@gmail.com> | 2018-03-20 10:38:31 +0200 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-27 13:28:24 +0000 |
commit | dfffb39ca8080b2c1bf58f01beeaa6791d1d5c64 (patch) | |
tree | 954bb1a2896e903fd48cef03eec82949bccbcce5 /include/private/SkSafe32.h | |
parent | d234c9e6b9a1a1b65009e7bbc4e076d1f11c3acc (diff) |
Fixed warnings for casting large type to smaller one.
Change-Id: Ib3e2661d0383bf154bc9178dac070dfd910a393c
Reviewed-on: https://skia-review.googlesource.com/115200
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'include/private/SkSafe32.h')
-rw-r--r-- | include/private/SkSafe32.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/private/SkSafe32.h b/include/private/SkSafe32.h index 25058d2c76..484644b9a7 100644 --- a/include/private/SkSafe32.h +++ b/include/private/SkSafe32.h @@ -9,7 +9,7 @@ #define SkSafe32_DEFINED static constexpr int32_t Sk64_pin_to_s32(int64_t x) { - return x < SK_MinS32 ? SK_MinS32 : (x > SK_MaxS32 ? SK_MaxS32 : x); + return x < SK_MinS32 ? SK_MinS32 : (x > SK_MaxS32 ? SK_MaxS32 : (int32_t)x); } static constexpr int32_t Sk32_sat_add(int32_t a, int32_t b) { |