From 5b8d0a77ff26e2643d45d7ffa4cc0494fc605871 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 17 Feb 2009 17:44:04 +0000 Subject: Added an "equals" function to Common::Rect (used by SCI) svn-id: r38428 --- common/rect.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'common') diff --git a/common/rect.h b/common/rect.h index 5d91fe496d..d01d910c3e 100644 --- a/common/rect.h +++ b/common/rect.h @@ -137,6 +137,17 @@ struct Rect { return (left < r.left) && (right > r.right) && (top < r.top) && (bottom > r.bottom); } + /** + * Check if the given rect is equal to this one. + * + * @param r The rectangle to check + * + * @return true if the given rect is equal, false otherwise + */ + bool equals(const Rect &r) const { + return (left == r.left) && (right == r.right) && (top == r.top) && (bottom == r.bottom); + } + /** * Check if given rectangle intersects with this rectangle * -- cgit v1.2.3