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

Unified Diff: src/core/SkRegion.cpp

Issue 247753003: fix size_t/int warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: revert name-change in swap32 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
« no previous file with comments | « src/core/SkReadBuffer.cpp ('k') | src/core/SkRegionPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRegion.cpp
diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp
index baedf2aea82c2f06a49db288bdaeaa22f243339b..98670b6b520e003f46f46618391a90c8feb01c6e 100644
--- a/src/core/SkRegion.cpp
+++ b/src/core/SkRegion.cpp
@@ -796,7 +796,7 @@ public:
fTop = (SkRegion::RunType)(bottom); // just update our bottom
} else {
start[-2] = (SkRegion::RunType)(bottom);
- start[-1] = len >> 1;
+ start[-1] = SkToS32(len >> 1);
fPrevDst = start;
fPrevLen = len;
}
@@ -1212,7 +1212,7 @@ static void compute_bounds(const SkRegion::RunType runs[],
const SkRegion::RunType* prev = runs;
runs = skip_intervals_slow(runs);
- int intervals = (runs - prev) >> 1;
+ int intervals = SkToInt((runs - prev) >> 1);
SkASSERT(prev[-1] == intervals);
intervalCount += intervals;
« no previous file with comments | « src/core/SkReadBuffer.cpp ('k') | src/core/SkRegionPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698