COMMON: Added equality operators to Common::Rect
svn-id: r52249
This commit is contained in:
parent
10066443b0
commit
5c30303794
1 changed files with 3 additions and 0 deletions
|
@ -90,6 +90,9 @@ struct Rect {
|
|||
Rect(int16 x1, int16 y1, int16 x2, int16 y2) : top(y1), left(x1), bottom(y2), right(x2) {
|
||||
assert(isValidRect());
|
||||
}
|
||||
bool operator==(const Rect &rhs) const { return equals(rhs); }
|
||||
bool operator!=(const Rect &rhs) const { return !equals(rhs); }
|
||||
|
||||
int16 width() const { return right - left; }
|
||||
int16 height() const { return bottom - top; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue