diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-17 02:41:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-17 02:41:49 +0100 |
| commit | 5d2ba0d2f7855ffe18ff8e5a96156ca17e50cd2b (patch) | |
| tree | 0341572be05213e0dbfb94720577616d9e3b002f /src/lib/util.cc | |
| parent | 7ef2ba523ca2ddc0470f5837bc88ad9c597361e2 (diff) | |
Windows apparently has Rectangle in the global namespace.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index cc201a0af..dc0ee5642 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -602,13 +602,13 @@ Socket::read_indefinite (uint8_t* data, int size, int timeout) memcpy (data, _buffer, size); } -Rectangle -Rectangle::intersection (Rectangle const & other) const +Rect +Rect::intersection (Rect const & other) const { int const tx = max (x, other.x); int const ty = max (y, other.y); - return Rectangle ( + return Rect ( tx, ty, min (x + width, other.x + other.width) - tx, min (y + height, other.y + other.height) - ty |
