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

Unified Diff: src/core/SkPath.cpp

Issue 14969003: Fix some warnings in SkPath. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPath.cpp
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 7ea102884f367be025ebb25016c7d75066050352..3dd619f5866cc153a2f8b536e3330d5e0f7be0aa 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -611,8 +611,8 @@ bool SkPath::isNestedRects(SkRect rects[2]) const {
const SkPoint* last = pts;
SkRect testRects[2];
if (isRectContour(false, &currVerb, &pts, NULL, NULL)) {
- testRects[0].set(first, last - first);
- testRects[1].set(last, pts - last);
+ testRects[0].set(first, SkToS32(last - first));
+ testRects[1].set(last, SkToS32(pts - last));
if (testRects[0].contains(testRects[1])) {
if (rects) {
rects[0] = testRects[0];
@@ -2084,7 +2084,7 @@ uint32_t SkPath::writeToMemory(void* storage) const {
buffer.write(&bounds, sizeof(bounds));
buffer.padToAlign4();
- return buffer.pos();
+ return SkToU32(buffer.pos());
}
uint32_t SkPath::readFromMemory(const void* storage) {
@@ -2116,7 +2116,7 @@ uint32_t SkPath::readFromMemory(const void* storage) {
GEN_ID_INC;
SkDEBUGCODE(this->validate();)
- return buffer.pos();
+ return SkToU32(buffer.pos());
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698