From 6d428d3e6e4238786a38caca6002dae92637958d Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Wed, 25 Jan 2012 21:53:53 +0000 Subject: Make SkRegion::operator== a member function, rather than a privately-declared friend. Without this, calling code has access to operator==, but can fail to link because the implementation is assumed to have static linkage. http://codereview.appspot.com/5577047/ git-svn-id: http://skia.googlecode.com/svn/trunk@3088 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkRegion.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp index 0a8ab6557e..dee652ba3b 100644 --- a/src/core/SkRegion.cpp +++ b/src/core/SkRegion.cpp @@ -455,18 +455,18 @@ bool SkRegion::intersects(const SkRegion& rgn) const { ///////////////////////////////////////////////////////////////////////////////////// -bool operator==(const SkRegion& a, const SkRegion& b) { - SkDEBUGCODE(a.validate();) +bool SkRegion::operator==(const SkRegion& b) const { + SkDEBUGCODE(validate();) SkDEBUGCODE(b.validate();) - if (&a == &b) { + if (this == &b) { return true; } - if (a.fBounds != b.fBounds) { + if (fBounds != b.fBounds) { return false; } - const SkRegion::RunHead* ah = a.fRunHead; + const SkRegion::RunHead* ah = fRunHead; const SkRegion::RunHead* bh = b.fRunHead; // this catches empties and rects being equal -- cgit v1.2.3