Skip to content

Commit

Permalink
equal
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Mar 11, 2018
1 parent 542c4d4 commit 49b6201
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/yrect.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ class YRect {
return intersect(r).pixels();
}

bool operator==(YRect const& r) const {
return xx == r.xx && yy == r.yy && ww == r.ww && hh == r.hh;
}
bool operator!=(YRect const& r) const {
return !(*this == r);
}

private:
int xx, yy;
unsigned ww, hh;
Expand Down

0 comments on commit 49b6201

Please sign in to comment.