aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2017-07-24 08:58:37 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-24 15:06:08 +0000
commit8e5be413c10bc5fa816f56a8b69f9962c4565eac (patch)
tree980873ebef4a206a4730bbc28a2f1b79927f31b9 /include/core
parent55963bcaab2bbbaf2b7574d906be82cf58fd0948 (diff)
Align const pointer casts in SkRect
Clang5 reports this as a bug. Bug: skia: Change-Id: I838b8abf2399429358f83d3232dc9d2caac54967 Reviewed-on: https://skia-review.googlesource.com/26080 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkRect.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index a7b8b119d2..a3819f424c 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -456,7 +456,7 @@ struct SK_API SkRect {
static SkRect Make(const SkISize& size) {
return MakeIWH(size.width(), size.height());
}
-
+
static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) {
SkRect r;
r.set(SkIntToScalar(irect.fLeft),
@@ -512,11 +512,11 @@ struct SK_API SkRect {
SkScalar centerY() const { return SkScalarHalf(fTop + fBottom); }
friend bool operator==(const SkRect& a, const SkRect& b) {
- return SkScalarsEqual((SkScalar*)&a, (SkScalar*)&b, 4);
+ return SkScalarsEqual((const SkScalar*)&a, (const SkScalar*)&b, 4);
}
friend bool operator!=(const SkRect& a, const SkRect& b) {
- return !SkScalarsEqual((SkScalar*)&a, (SkScalar*)&b, 4);
+ return !SkScalarsEqual((const SkScalar*)&a, (const SkScalar*)&b, 4);
}
/** return the 4 points that enclose the rectangle (top-left, top-right, bottom-right,
@@ -633,7 +633,7 @@ struct SK_API SkRect {
SkRect makeOffset(SkScalar dx, SkScalar dy) const {
return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy);
}
-
+
/**
* Return a new Rect, built as an inset of this rect.
*/
@@ -883,14 +883,14 @@ public:
this->round(&ir);
return ir;
}
-
+
//! Returns the result of calling roundOut(&dst)
SkIRect roundOut() const {
SkIRect ir;
this->roundOut(&ir);
return ir;
}
-
+
/**
* Swap top/bottom or left/right if there are flipped (i.e. if width()
* or height() would have returned a negative value.) This should be called