aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRect.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-01-07 09:12:43 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-07 09:12:43 -0800
commit690fc594f11a987ba0e885a7eb01aff363395f12 (patch)
treebca37044feffc8e2ae1b54f86fd46bd0f9732909 /include/core/SkRect.h
parent7e44bb191633e225fd0455c267dbf67f9ee8633e (diff)
Revert of It is dangerous to ignore SkRect::intersect's return value (patchset #6 id:100001 of https://codereview.chromium.org/833943002/)
Reason for revert: Still more Chromium clean up to do Original issue's description: > It is dangerous to ignore SkRect::intersect's return value > > Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05 TBR=reed@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/825983005
Diffstat (limited to 'include/core/SkRect.h')
-rw-r--r--include/core/SkRect.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index 06f8abe0e4..cafc59afa7 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -267,7 +267,7 @@ struct SK_API SkIRect {
intersection, otherwise return false and do not change this rectangle.
If either rectangle is empty, do nothing and return false.
*/
- bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& r) {
+ bool intersect(const SkIRect& r) {
SkASSERT(&r);
return this->intersect(r.fLeft, r.fTop, r.fRight, r.fBottom);
}
@@ -276,7 +276,7 @@ struct SK_API SkIRect {
that intersection, otherwise return false and do not change this
rectangle. If either rectangle is empty, do nothing and return false.
*/
- bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& a, const SkIRect& b) {
+ bool intersect(const SkIRect& a, const SkIRect& b) {
if (!a.isEmpty() && !b.isEmpty() &&
a.fLeft < b.fRight && b.fLeft < a.fRight &&
@@ -296,7 +296,7 @@ struct SK_API SkIRect {
If either is, then the return result is undefined. In the debug build,
we assert that both rectangles are non-empty.
*/
- bool SK_WARN_UNUSED_RESULT intersectNoEmptyCheck(const SkIRect& a, const SkIRect& b) {
+ bool intersectNoEmptyCheck(const SkIRect& a, const SkIRect& b) {
SkASSERT(!a.isEmpty() && !b.isEmpty());
if (a.fLeft < b.fRight && b.fLeft < a.fRight &&
@@ -315,8 +315,7 @@ struct SK_API SkIRect {
otherwise return false and do not change this rectangle.
If either rectangle is empty, do nothing and return false.
*/
- bool SK_WARN_UNUSED_RESULT intersect(int32_t left, int32_t top,
- int32_t right, int32_t bottom) {
+ bool intersect(int32_t left, int32_t top, int32_t right, int32_t bottom) {
if (left < right && top < bottom && !this->isEmpty() &&
fLeft < right && left < fRight && fTop < bottom && top < fBottom) {
if (fLeft < left) fLeft = left;
@@ -332,8 +331,8 @@ struct SK_API SkIRect {
*/
static bool Intersects(const SkIRect& a, const SkIRect& b) {
return !a.isEmpty() && !b.isEmpty() && // check for empties
- a.fLeft < b.fRight && b.fLeft < a.fRight &&
- a.fTop < b.fBottom && b.fTop < a.fBottom;
+ a.fLeft < b.fRight && b.fLeft < a.fRight &&
+ a.fTop < b.fBottom && b.fTop < a.fBottom;
}
/**
@@ -657,22 +656,21 @@ struct SK_API SkRect {
intersection, otherwise return false and do not change this rectangle.
If either rectangle is empty, do nothing and return false.
*/
- bool SK_WARN_UNUSED_RESULT intersect(const SkRect& r);
+ bool intersect(const SkRect& r);
/** If this rectangle intersects the rectangle specified by left, top, right, bottom,
return true and set this rectangle to that intersection, otherwise return false
and do not change this rectangle.
If either rectangle is empty, do nothing and return false.
*/
- bool SK_WARN_UNUSED_RESULT intersect(SkScalar left, SkScalar top,
- SkScalar right, SkScalar bottom);
+ bool intersect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom);
/**
* If rectangles a and b intersect, return true and set this rectangle to
* that intersection, otherwise return false and do not change this
* rectangle. If either rectangle is empty, do nothing and return false.
*/
- bool SK_WARN_UNUSED_RESULT intersect(const SkRect& a, const SkRect& b);
+ bool intersect(const SkRect& a, const SkRect& b);
private: