diff options
author | Filippos Karapetis | 2009-02-17 17:44:04 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-02-17 17:44:04 +0000 |
commit | 5b8d0a77ff26e2643d45d7ffa4cc0494fc605871 (patch) | |
tree | a5766f40f1252380e29f015a8083b15a4fdd6e70 /common | |
parent | 57176cdce18fd6651c0aaab3acc688dfecc76df1 (diff) | |
download | scummvm-rg350-5b8d0a77ff26e2643d45d7ffa4cc0494fc605871.tar.gz scummvm-rg350-5b8d0a77ff26e2643d45d7ffa4cc0494fc605871.tar.bz2 scummvm-rg350-5b8d0a77ff26e2643d45d7ffa4cc0494fc605871.zip |
Added an "equals" function to Common::Rect (used by SCI)
svn-id: r38428
Diffstat (limited to 'common')
-rw-r--r-- | common/rect.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h index 5d91fe496d..d01d910c3e 100644 --- a/common/rect.h +++ b/common/rect.h @@ -138,6 +138,17 @@ struct Rect { } /** + * 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 * * @param r the rectangle to check |