aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2016-10-26 09:45:23 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-26 14:16:28 +0000
commit3cfdf6c8b1f0c6ebe59ddd0d2750976c2dd1921d (patch)
treea9da426b3cf45907ce948eaef085ac0d0780473e /third_party
parentf2361d2d93c200cd4555b5e8ecea4531801abaaa (diff)
Fix some Windows warnings
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3980 Change-Id: Icfc5dfb985b966c625d9bc81f61719ac5549085e Reviewed-on: https://skia-review.googlesource.com/3980 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'third_party')
-rw-r--r--third_party/gif/SkGifImageReader.cpp4
-rw-r--r--third_party/gif/SkGifImageReader.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/third_party/gif/SkGifImageReader.cpp b/third_party/gif/SkGifImageReader.cpp
index 9c8214cbfb..228c8ec16e 100644
--- a/third_party/gif/SkGifImageReader.cpp
+++ b/third_party/gif/SkGifImageReader.cpp
@@ -728,7 +728,7 @@ bool SkGifImageReader::parse(SkGifImageReader::SkGIFParseQuery query)
}
}
- const bool isLocalColormapDefined = currentComponent[8] & 0x80;
+ const bool isLocalColormapDefined = SkToBool(currentComponent[8] & 0x80);
// The three low-order bits of currentComponent[8] specify the bits per pixel.
const size_t numColors = 2 << (currentComponent[8] & 0x7);
if (currentFrameIsFirstFrame()) {
@@ -782,7 +782,7 @@ bool SkGifImageReader::parse(SkGifImageReader::SkGIFParseQuery query)
currentFrame->setHeaderDefined();
currentFrame->setRect(xOffset, yOffset, width, height);
- currentFrame->setInterlaced(currentComponent[8] & 0x40);
+ currentFrame->setInterlaced(SkToBool(currentComponent[8] & 0x40));
// Overlaying interlaced, transparent GIFs over
// existing image data using the Haeberli display hack
diff --git a/third_party/gif/SkGifImageReader.h b/third_party/gif/SkGifImageReader.h
index 09c5622550..45a1ce6dc6 100644
--- a/third_party/gif/SkGifImageReader.h
+++ b/third_party/gif/SkGifImageReader.h
@@ -110,7 +110,7 @@ public:
bool prepareToDecode();
bool outputRow(const unsigned char* rowBegin);
bool doLZW(const unsigned char* block, size_t bytesInBlock);
- bool hasRemainingRows() { return rowsRemaining; }
+ bool hasRemainingRows() { return SkToBool(rowsRemaining); }
private:
// LZW decoding states and output states.