aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-07-25 09:16:33 +0000
committerMax Horn2008-07-25 09:16:33 +0000
commit1bf64890e53e6c85d3402f3f252fd6118c33ff28 (patch)
tree11d564691f2357d0467a3bd4e5de8e4f0153b246
parentf96faab2ba530375dbd32f31761430535473dd60 (diff)
downloadscummvm-rg350-1bf64890e53e6c85d3402f3f252fd6118c33ff28.tar.gz
scummvm-rg350-1bf64890e53e6c85d3402f3f252fd6118c33ff28.tar.bz2
scummvm-rg350-1bf64890e53e6c85d3402f3f252fd6118c33ff28.zip
Added Common::Rect::isEmpty() method
svn-id: r33279
-rw-r--r--common/rect.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h
index f71124434a..dcf1c8b421 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -177,6 +177,10 @@ struct Rect {
clip(Rect(0, 0, maxw, maxh));
}
+ bool isEmpty() const {
+ return (left >= right || top >= bottom);
+ }
+
bool isValidRect() const {
return (left <= right && top <= bottom);
}