aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-25 21:53:53 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-25 21:53:53 +0000
commit6d428d3e6e4238786a38caca6002dae92637958d (patch)
treeaddb027981e858f56d36e5a5dc250c55869dbd9e /src
parent27accef223a27fba437f5e825d99edbae20a045b (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/core/SkRegion.cpp10
1 files changed, 5 insertions, 5 deletions
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