diff options
author | Petr Hosek <phosek@google.com> | 2017-09-09 01:54:43 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-09 13:02:59 +0000 |
commit | 8bc691705347680cd3d6e67dccdda59777e94f86 (patch) | |
tree | 4726ab17155349c3504d33a3c87bd1ac41496e61 /src | |
parent | 11cd4640d4d900437335d099521058a777adf4e3 (diff) |
Use enum value as the lower bound
This is triggering a compilation error in the latest version of Clang
because of the new Wtautological-unsigned-zero-compare warning.
Change-Id: I578eb1244719fd331113b9444e2eca672912afc8
Reviewed-on: https://skia-review.googlesource.com/44580
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkImageInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkImageInfo.cpp b/src/core/SkImageInfo.cpp index 8006441574..1baf0b77de 100644 --- a/src/core/SkImageInfo.cpp +++ b/src/core/SkImageInfo.cpp @@ -71,11 +71,11 @@ static SkColorType stored_to_live(unsigned stored) { /////////////////////////////////////////////////////////////////////////////////////////////////// static bool alpha_type_is_valid(SkAlphaType alphaType) { - return (alphaType >= 0) && (alphaType <= kLastEnum_SkAlphaType); + return (alphaType >= kUnknown_SkAlphaType) && (alphaType <= kLastEnum_SkAlphaType); } static bool color_type_is_valid(SkColorType colorType) { - return (colorType >= 0) && (colorType <= kLastEnum_SkColorType); + return (colorType >= kUnknown_SkColorType) && (colorType <= kLastEnum_SkColorType); } SkImageInfo SkImageInfo::MakeS32(int width, int height, SkAlphaType at) { |