From a70b1a988166014a4b699106b1125725636a11e7 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 1 May 2012 14:55:06 +0000 Subject: [PATCH] - patch to compile on gcc 4.7 --- source/shared_lib/include/graphics/math_util.h | 8 ++++---- source/shared_lib/sources/util/util.cpp | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/shared_lib/include/graphics/math_util.h b/source/shared_lib/include/graphics/math_util.h index 6b8760dd0..5088389cd 100644 --- a/source/shared_lib/include/graphics/math_util.h +++ b/source/shared_lib/include/graphics/math_util.h @@ -184,10 +184,10 @@ public: Rect2 computeBoundingRect() const{ return Rect2i( - min(p[0].x, p[1].x), - min(p[0].y, p[2].y), - max(p[2].x, p[3].x), - max(p[1].y, p[3].y)); + std::min(p[0].x, p[1].x), + std::min(p[0].y, p[2].y), + std::max(p[2].x, p[3].x), + std::max(p[1].y, p[3].y)); } bool isInside(const Vec2 &pt) const{ diff --git a/source/shared_lib/sources/util/util.cpp b/source/shared_lib/sources/util/util.cpp index 1ac73a15e..9b730e973 100644 --- a/source/shared_lib/sources/util/util.cpp +++ b/source/shared_lib/sources/util/util.cpp @@ -22,6 +22,8 @@ #ifdef WIN32 #include // for open() +#else + #include #endif #include // for open()