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

Unified Diff: src/core/SkScalerContext.cpp

Issue 247753003: fix size_t/int warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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
Index: src/core/SkScalerContext.cpp
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index d0d24eebe8c0f077404bc8b96630b7ddbd06ef1c..05bbcfb9a6424ff0d93565cda2f892c0689b0525 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -548,8 +548,8 @@ static void packA8ToA1(const SkMask& mask, const uint8_t* src, size_t srcRB) {
const int dstPad = mask.fRowBytes - SkAlign8(width)/8;
SkASSERT(dstPad >= 0);
- const int srcPad = srcRB - width;
- SkASSERT(srcPad >= 0);
+ SkASSERT(srcRB >= (size_t)width);
mtklein 2014/04/23 13:36:18 Is it sensible to add in SkASSERT(width >= 0) here
reed1 2014/04/23 14:04:22 yes, width should be >= 0. Will add that assert.
+ const size_t srcPad = srcRB - width;
for (int y = 0; y < height; ++y) {
for (int i = 0; i < octs; ++i) {

Powered by Google App Engine
This is Rietveld 408576698