From 5d2ba0d2f7855ffe18ff8e5a96156ca17e50cd2b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 17 Oct 2012 02:41:49 +0100 Subject: Windows apparently has Rectangle in the global namespace. --- src/lib/util.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/util.cc') 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 -- cgit v1.2.3