diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:35:28 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:35:28 +0100 |
commit | 615a0f58f17d46fe861f753418bfa78ae19bce89 (patch) | |
tree | 2a4a3c24714ba46bbbe33c780287a345eea162e3 /common/rfb | |
parent | fb450fba5d8737310a1f205ea3d38467dedf6afa (diff) | |
download | tigervnc-615a0f58f17d46fe861f753418bfa78ae19bce89.tar.gz tigervnc-615a0f58f17d46fe861f753418bfa78ae19bce89.zip |
Make Rect::area() signed, just like Rect::width()/height()
Makes it more sane what type to use when interacting with this class.
Diffstat (limited to 'common/rfb')
-rw-r--r-- | common/rfb/Rect.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rfb/Rect.h b/common/rfb/Rect.h index 52e92b57..b5ae2548 100644 --- a/common/rfb/Rect.h +++ b/common/rfb/Rect.h @@ -102,7 +102,7 @@ namespace rfb { inline bool overlaps(const Rect &r) const { return tl.x < r.br.x && tl.y < r.br.y && br.x > r.tl.x && br.y > r.tl.y; } - inline unsigned int area() const {return is_empty() ? 0 : (br.x-tl.x)*(br.y-tl.y);} + inline int area() const {return is_empty() ? 0 : (br.x-tl.x)*(br.y-tl.y);} inline Point dimensions() const {return Point(width(), height());} inline int width() const {return br.x-tl.x;} inline int height() const {return br.y-tl.y;} |