mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 16:35:20 +00:00
COMMON: Added equality operators to Common::Rect
svn-id: r52249
This commit is contained in:
parent
10066443b0
commit
5c30303794
@ -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…
x
Reference in New Issue
Block a user