From 06910786a1068faf9a1119f2163cc44c7c81fae0 Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Mon, 15 Apr 2013 22:12:43 +0000 Subject: [PATCH] Use ILLEGAL_MODE macro to silence clang error. This fixes the following clang error: ../../tests/XfermodeTest.cpp:43:44: error: comparison of constant -1 with expression of type 'SkXfermode::Mode' is always false [-Werror,-Wtautological-constant-out-of-range-compare] REPORTER_ASSERT(reporter, reportedMode == -1); ~~~~~~~~~~~~ ^ ~~ R=vandebo@chromium.org,reed@google.com Review URL: https://codereview.chromium.org/14180004 git-svn-id: http://skia.googlecode.com/svn/trunk@8692 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/XfermodeTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/XfermodeTest.cpp b/tests/XfermodeTest.cpp index 0b7012d..620fbf4 100644 --- a/tests/XfermodeTest.cpp +++ b/tests/XfermodeTest.cpp @@ -38,11 +38,11 @@ static void test_asMode(skiatest::Reporter* reporter) { } SkXfermode* bogusXfer = new SkProcXfermode(bogusXfermodeProc); - SkXfermode::Mode reportedMode = (SkXfermode::Mode) -1; + SkXfermode::Mode reportedMode = ILLEGAL_MODE; REPORTER_ASSERT(reporter, !bogusXfer->asMode(&reportedMode)); - REPORTER_ASSERT(reporter, reportedMode == -1); + REPORTER_ASSERT(reporter, reportedMode == ILLEGAL_MODE); REPORTER_ASSERT(reporter, !SkXfermode::IsMode(bogusXfer, &reportedMode)); - REPORTER_ASSERT(reporter, reportedMode == -1); + REPORTER_ASSERT(reporter, reportedMode == ILLEGAL_MODE); bogusXfer->unref(); } -- 2.7.4