Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Unified Diff: src/animator/SkDrawPaint.cpp

Issue 12906016: Fix more clang tautological-constant-out-of-range-compare errors. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address review Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleStrokeText.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkDrawPaint.cpp
diff --git a/src/animator/SkDrawPaint.cpp b/src/animator/SkDrawPaint.cpp
index 4d1bd8b4305921499cbaf5732287f591be2eb93b..22d99e4f21cd0e9070c71023b4a0adfa12385e60 100644
--- a/src/animator/SkDrawPaint.cpp
+++ b/src/animator/SkDrawPaint.cpp
@@ -224,7 +224,7 @@ void SkDrawPaint::setupPaint(SkPaint* paint) const {
// stroke is legacy; style setting if present overrides stroke
if (stroke != -1)
paint->setStyle(SkToBool(stroke) ? SkPaint::kStroke_Style : SkPaint::kFill_Style);
- if (style != (SkPaint::Style) -1)
+ if (style != -1)
paint->setStyle((SkPaint::Style) style);
if (linearText != -1)
paint->setLinearText(SkToBool(linearText));
@@ -242,15 +242,15 @@ void SkDrawPaint::setupPaint(SkPaint* paint) const {
SkSafeUnref(paint->setShader(shader->getShader()));
if (strikeThru != -1)
paint->setStrikeThruText(SkToBool(strikeThru));
- if (strokeCap != (SkPaint::Cap) -1)
+ if (strokeCap != -1)
paint->setStrokeCap((SkPaint::Cap) strokeCap);
- if (strokeJoin != (SkPaint::Join) -1)
+ if (strokeJoin != -1)
paint->setStrokeJoin((SkPaint::Join) strokeJoin);
if (SkScalarIsNaN(strokeMiter) == false)
paint->setStrokeMiter(strokeMiter);
if (SkScalarIsNaN(strokeWidth) == false)
paint->setStrokeWidth(strokeWidth);
- if (textAlign != (SkPaint::Align) -1)
+ if (textAlign != -1)
paint->setTextAlign((SkPaint::Align) textAlign);
if (SkScalarIsNaN(textScaleX) == false)
paint->setTextScaleX(textScaleX);
@@ -264,6 +264,6 @@ void SkDrawPaint::setupPaint(SkPaint* paint) const {
SkSafeUnref(paint->setTypeface(typeface->getTypeface()));
if (underline != -1)
paint->setUnderlineText(SkToBool(underline));
- if (xfermode != (SkXfermode::Mode) -1)
+ if (xfermode != -1)
paint->setXfermodeMode((SkXfermode::Mode) xfermode);
}
« no previous file with comments | « samplecode/SampleStrokeText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698