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:
parent
10fb0a6df8
commit
181d7ba4cd
@ -197,7 +197,6 @@ bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
|
|||||||
|
|
||||||
bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
|
bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
|
||||||
SkIRect* dst) const {
|
SkIRect* dst) const {
|
||||||
SkASSERT(&src);
|
|
||||||
SkASSERT(dst);
|
SkASSERT(dst);
|
||||||
return this->onFilterBounds(src, ctm, dst);
|
return this->onFilterBounds(src, ctm, dst);
|
||||||
}
|
}
|
||||||
|
@ -116,8 +116,6 @@ SkPaint& SkPaint::operator=(const SkPaint& src) {
|
|||||||
#define COPY(field) field = src.field
|
#define COPY(field) field = src.field
|
||||||
#define REF_COPY(field) SkSafeUnref(field); field = SkSafeRef(src.field)
|
#define REF_COPY(field) SkSafeUnref(field); field = SkSafeRef(src.field)
|
||||||
|
|
||||||
SkASSERT(&src);
|
|
||||||
|
|
||||||
REF_COPY(fTypeface);
|
REF_COPY(fTypeface);
|
||||||
REF_COPY(fPathEffect);
|
REF_COPY(fPathEffect);
|
||||||
REF_COPY(fShader);
|
REF_COPY(fShader);
|
||||||
|
@ -179,8 +179,6 @@ bool operator==(const SkPath& a, const SkPath& b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SkPath::swap(SkPath& that) {
|
void SkPath::swap(SkPath& that) {
|
||||||
SkASSERT(&that != NULL);
|
|
||||||
|
|
||||||
if (this != &that) {
|
if (this != &that) {
|
||||||
fPathRef.swap(&that.fPathRef);
|
fPathRef.swap(&that.fPathRef);
|
||||||
SkTSwap<int>(fLastMoveToIndex, that.fLastMoveToIndex);
|
SkTSwap<int>(fLastMoveToIndex, that.fLastMoveToIndex);
|
||||||
|
@ -1554,7 +1554,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
void SkStroke::strokePath(const SkPath& src, SkPath* dst) const {
|
void SkStroke::strokePath(const SkPath& src, SkPath* dst) const {
|
||||||
SkASSERT(&src != NULL && dst != NULL);
|
SkASSERT(dst);
|
||||||
|
|
||||||
SkScalar radius = SkScalarHalf(fWidth);
|
SkScalar radius = SkScalarHalf(fWidth);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user