SkPaint& operator=(const SkPaint&);
- SK_API friend int operator==(const SkPaint& a, const SkPaint& b);
- friend int operator!=(const SkPaint& a, const SkPaint& b) {
+ SK_API friend bool operator==(const SkPaint& a, const SkPaint& b);
+ friend bool operator!=(const SkPaint& a, const SkPaint& b) {
return !(a == b);
}
*/
int height() const { return fBottom - fTop; }
- friend int operator==(const SkIRect& a, const SkIRect& b) {
+ friend bool operator==(const SkIRect& a, const SkIRect& b) {
return !memcmp(&a, &b, sizeof(a));
}
- friend int operator!=(const SkIRect& a, const SkIRect& b) {
- return memcmp(&a, &b, sizeof(a));
+ friend bool operator!=(const SkIRect& a, const SkIRect& b) {
+ return !(a == b);
}
bool is16Bit() const {
return SkStrEndsWith(fRec->data(), suffix);
}
- friend int operator==(const SkString& a, const SkString& b) {
+ friend bool operator==(const SkString& a, const SkString& b) {
return a.equals(b);
}
- friend int operator!=(const SkString& a, const SkString& b) {
+ friend bool operator!=(const SkString& a, const SkString& b) {
return !a.equals(b);
}
// these methods edit the string
- SkString& operator=(const SkString&);
- SkString& operator=(const char text[]);
+ SkString& operator=(const SkString&);
+ SkString& operator=(const char text[]);
- char* writable_str();
+ char* writable_str();
char& operator[](size_t n) { return this->writable_str()[n]; }
void reset();
return *this;
}
- friend int operator==(const SkTDArray<T>& a, const SkTDArray<T>& b) {
+ friend bool operator==(const SkTDArray<T>& a, const SkTDArray<T>& b) {
return a.fCount == b.fCount &&
(a.fCount == 0 ||
!memcmp(a.fArray, b.fArray, a.fCount * sizeof(T)));
return *this;
}
-int operator==(const SkPaint& a, const SkPaint& b) {
- return memcmp(&a, &b, sizeof(a)) == 0;
+bool operator==(const SkPaint& a, const SkPaint& b) {
+ return !memcmp(&a, &b, sizeof(a));
}
void SkPaint::reset() {