From 8bc691705347680cd3d6e67dccdda59777e94f86 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Sat, 9 Sep 2017 01:54:43 -0700 Subject: 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 Commit-Queue: Mike Klein --- src/core/SkImageInfo.cpp | 4 ++-- 1 file 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) { -- cgit v1.2.3