diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-20 15:46:10 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-20 15:46:10 +0000 |
commit | 80051d38a3469adb67fa7f503cf43fc2960c28b7 (patch) | |
tree | 482d08d18c885cd0b7a621d3c1c320d3cefafdc8 /src/images | |
parent | f1077f916427c99bdec655da4c3b9eea70423685 (diff) |
More Windows 64b compilation warning fixes
https://codereview.chromium.org/47513017/
git-svn-id: http://skia.googlecode.com/svn/trunk@12315 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images')
-rw-r--r-- | src/images/bmpdecoderhelper.cpp | 6 | ||||
-rw-r--r-- | src/images/bmpdecoderhelper.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/images/bmpdecoderhelper.cpp b/src/images/bmpdecoderhelper.cpp index 77496649c2..9f0e61b8ef 100644 --- a/src/images/bmpdecoderhelper.cpp +++ b/src/images/bmpdecoderhelper.cpp @@ -18,7 +18,7 @@ static const int kBmpOS2InfoSize = 12; static const int kMaxDim = SHRT_MAX / 2; bool BmpDecoderHelper::DecodeImage(const char* p, - int len, + size_t len, int max_pixels, BmpDecoderCallback* callback) { data_ = reinterpret_cast<const uint8*>(p); @@ -182,7 +182,7 @@ void BmpDecoderHelper::DoRLEDecode() { static const uint8 RLE_DELTA = 2; int x = 0; int y = height_ - 1; - while (pos_ < len_ - 1) { + while (pos_ + 1 < len_) { uint8 cmd = GetByte(); if (cmd != RLE_ESCAPE) { uint8 pixels = GetByte(); @@ -210,7 +210,7 @@ void BmpDecoderHelper::DoRLEDecode() { return; } } else if (cmd == RLE_DELTA) { - if (pos_ < len_ - 1) { + if (pos_ + 1 < len_) { uint8 dx = GetByte(); uint8 dy = GetByte(); x += dx; diff --git a/src/images/bmpdecoderhelper.h b/src/images/bmpdecoderhelper.h index f2f410941e..d8bc8c39d0 100644 --- a/src/images/bmpdecoderhelper.h +++ b/src/images/bmpdecoderhelper.h @@ -72,7 +72,7 @@ class BmpDecoderHelper { BmpDecoderHelper() { } ~BmpDecoderHelper() { } bool DecodeImage(const char* data, - int len, + size_t len, int max_pixels, BmpDecoderCallback* callback); @@ -91,7 +91,7 @@ class BmpDecoderHelper { const uint8* data_; int pos_; - int len_; + size_t len_; int width_; int height_; int bpp_; |