Fix some warnings when including some Skia headers in Chromium code under VS2008.

Review URL: http://codereview.appspot.com/4956058/



git-svn-id: http://skia.googlecode.com/svn/trunk@2209 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-09-01 15:34:14 +00:00
parent 2869820cb5
commit e174ea4bb1
2 changed files with 4 additions and 5 deletions

View File

@ -119,7 +119,6 @@ private:
switch (fType) {
case kRect_ClipType:
return fRect == e.fRect;
break;
case kPath_ClipType:
return fPath == e.fPath;
default:

View File

@ -336,12 +336,12 @@ struct SK_API SkRect {
SkScalar centerX() const { return SkScalarHalf(fLeft + fRight); }
SkScalar centerY() const { return SkScalarHalf(fTop + fBottom); }
friend int operator==(const SkRect& a, const SkRect& b) {
return !memcmp(&a, &b, sizeof(a));
friend bool operator==(const SkRect& a, const SkRect& b) {
return 0 == memcmp(&a, &b, sizeof(a));
}
friend int operator!=(const SkRect& a, const SkRect& b) {
return memcmp(&a, &b, sizeof(a));
friend bool operator!=(const SkRect& a, const SkRect& b) {
return 0 != memcmp(&a, &b, sizeof(a));
}
/** return the 4 points that enclose the rectangle