aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar dongseong.hwang <dongseong.hwang@intel.com>2015-04-28 12:47:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-28 12:47:48 -0700
commit79612de00f66408cff253605fbe2bb2a9e2b27ff (patch)
treeaee7e4f479d1f13c572cacc47d216e963d12eea8
parentfcabe429a4cd55d4b0b6c3e7b8b648fe8b35924d (diff)
Remove useless SkASSERT in SkRect.h and SkRegion.h
The pointer of reference is always not-null. It causes >50k lines of warnning when chromium is compiled by clang. Warning looks like ../../third_party/skia/include/core/SkRect.h:284:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] do { if (&r) break; SkNO_RETURN_HINT(); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, false, "%s:%d: failed assertion \"%s\"\n", "../../third_party/skia/include/core/SkRect.h", 284, "&r"); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, true, "SK_CRASH"); } while (false); Review URL: https://codereview.chromium.org/1111013002
-rw-r--r--include/core/SkRect.h1
-rw-r--r--include/core/SkRegion.h1
2 files changed, 0 insertions, 2 deletions
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index 5c806a963b..0f68825fc1 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -281,7 +281,6 @@ struct SK_API SkIRect {
If either rectangle is empty, do nothing and return false.
*/
bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& r) {
- SkASSERT(&r);
return this->intersect(r.fLeft, r.fTop, r.fRight, r.fBottom);
}
diff --git a/include/core/SkRegion.h b/include/core/SkRegion.h
index 20366bc638..eb0f1367ab 100644
--- a/include/core/SkRegion.h
+++ b/include/core/SkRegion.h
@@ -59,7 +59,6 @@ public:
* resulting region is non-empty.
*/
bool set(const SkRegion& src) {
- SkASSERT(&src);
*this = src;
return !this->isEmpty();
}