update to accommodate latest clang in chrome toolchain
remove asserts for null pointers to references
change var args signature to pointer instead of array
R=mtklein@google.com, reed@android.com, reed@google.com, mtklein, reed
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/577243002
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index 77051c2..c8fc7c6 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -277,7 +277,6 @@
rectangle. If either rectangle is empty, do nothing and return false.
*/
bool intersect(const SkIRect& a, const SkIRect& b) {
- SkASSERT(&a && &b);
if (!a.isEmpty() && !b.isEmpty() &&
a.fLeft < b.fRight && b.fLeft < a.fRight &&
@@ -298,7 +297,6 @@
we assert that both rectangles are non-empty.
*/
bool intersectNoEmptyCheck(const SkIRect& a, const SkIRect& b) {
- SkASSERT(&a && &b);
SkASSERT(!a.isEmpty() && !b.isEmpty());
if (a.fLeft < b.fRight && b.fLeft < a.fRight &&
diff --git a/include/views/SkOSMenu.h b/include/views/SkOSMenu.h
index 8801a52..7325418 100644
--- a/include/views/SkOSMenu.h
+++ b/include/views/SkOSMenu.h
@@ -129,7 +129,7 @@
*/
int appendAction(const char label[], SkEventSinkID target);
int appendList(const char label[], const char slotName[],
- SkEventSinkID target, int defaultIndex, const char[] ...);
+ SkEventSinkID target, int defaultIndex, const char* ...);
int appendSlider(const char label[], const char slotName[],
SkEventSinkID target, SkScalar min, SkScalar max,
SkScalar defaultValue);
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 2a29587..956cf46 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -1061,7 +1061,7 @@
}
bool SkMatrix::mapRect(SkRect* dst, const SkRect& src) const {
- SkASSERT(dst && &src);
+ SkASSERT(dst);
if (this->rectStaysRect()) {
this->mapPoints((SkPoint*)dst, (const SkPoint*)&src, 2);
diff --git a/src/core/SkRect.cpp b/src/core/SkRect.cpp
index 3cff5d8..2814375 100644
--- a/src/core/SkRect.cpp
+++ b/src/core/SkRect.cpp
@@ -114,12 +114,10 @@
}
bool SkRect::intersect(const SkRect& r) {
- SkASSERT(&r);
return this->intersect(r.fLeft, r.fTop, r.fRight, r.fBottom);
}
bool SkRect::intersect2(const SkRect& r) {
- SkASSERT(&r);
SkScalar L = SkMaxScalar(fLeft, r.fLeft);
SkScalar R = SkMinScalar(fRight, r.fRight);
if (L >= R) {
@@ -135,7 +133,6 @@
}
bool SkRect::intersect(const SkRect& a, const SkRect& b) {
- SkASSERT(&a && &b);
if (!a.isEmpty() && !b.isEmpty() &&
a.fLeft < b.fRight && b.fLeft < a.fRight &&
diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp
index 0d95061..184f66c 100644
--- a/src/core/SkScan_Path.cpp
+++ b/src/core/SkScan_Path.cpp
@@ -432,7 +432,7 @@
void sk_fill_path(const SkPath& path, const SkIRect* clipRect, SkBlitter* blitter,
int start_y, int stop_y, int shiftEdgesUp,
const SkRegion& clipRgn) {
- SkASSERT(&path && blitter);
+ SkASSERT(blitter);
SkEdgeBuilder builder;
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 98a4454..7ac2083 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -1341,7 +1341,7 @@
SkPath* path) {
SkAutoMutexAcquire ac(gFTMutex);
- SkASSERT(&glyph && path);
+ SkASSERT(path);
if (this->setupSize()) {
path->reset();
diff --git a/src/views/SkTextBox.cpp b/src/views/SkTextBox.cpp
index b0a42cd..55d75a6 100644
--- a/src/views/SkTextBox.cpp
+++ b/src/views/SkTextBox.cpp
@@ -167,7 +167,7 @@
void SkTextBox::draw(SkCanvas* canvas, const char text[], size_t len, const SkPaint& paint)
{
- SkASSERT(canvas && &paint && (text || len == 0));
+ SkASSERT(canvas && (text || len == 0));
SkScalar marginWidth = fBox.width();
diff --git a/src/views/SkViewPriv.cpp b/src/views/SkViewPriv.cpp
index 048ff08..6d90814 100644
--- a/src/views/SkViewPriv.cpp
+++ b/src/views/SkViewPriv.cpp
@@ -17,7 +17,7 @@
void SkView::Artist::inflate(const SkDOM& dom, const SkDOM::Node* node)
{
- SkASSERT(&dom && node);
+ SkASSERT(node);
this->onInflate(dom, node);
}
@@ -63,7 +63,7 @@
void SkView::Layout::inflate(const SkDOM& dom, const SkDOM::Node* node)
{
- SkASSERT(&dom && node);
+ SkASSERT(node);
this->onInflate(dom, node);
}