From 5c30303794da71a4f48704d2b4e7e04e7ddce178 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 21 Aug 2010 08:17:06 +0000 Subject: COMMON: Added equality operators to Common::Rect svn-id: r52249 --- common/rect.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/rect.h') diff --git a/common/rect.h b/common/rect.h index dc97dcceec..326f481f3b 100644 --- a/common/rect.h +++ b/common/rect.h @@ -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; } -- cgit v1.2.3