Fix build warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]

Review URL: https://codereview.chromium.org/1110353003
This commit is contained in:
dongseong.hwang 2015-04-30 05:53:27 -07:00 committed by Commit bot
parent 10fb0a6df8
commit 181d7ba4cd
4 changed files with 1 additions and 6 deletions

View File

@ -197,7 +197,6 @@ bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
SkIRect* dst) const {
SkASSERT(&src);
SkASSERT(dst);
return this->onFilterBounds(src, ctm, dst);
}

View File

@ -116,8 +116,6 @@ SkPaint& SkPaint::operator=(const SkPaint& src) {
#define COPY(field) field = src.field
#define REF_COPY(field) SkSafeUnref(field); field = SkSafeRef(src.field)
SkASSERT(&src);
REF_COPY(fTypeface);
REF_COPY(fPathEffect);
REF_COPY(fShader);

View File

@ -179,8 +179,6 @@ bool operator==(const SkPath& a, const SkPath& b) {
}
void SkPath::swap(SkPath& that) {
SkASSERT(&that != NULL);
if (this != &that) {
fPathRef.swap(&that.fPathRef);
SkTSwap<int>(fLastMoveToIndex, that.fLastMoveToIndex);

View File

@ -1554,7 +1554,7 @@ private:
};
void SkStroke::strokePath(const SkPath& src, SkPath* dst) const {
SkASSERT(&src != NULL && dst != NULL);
SkASSERT(dst);
SkScalar radius = SkScalarHalf(fWidth);