[glest] Another try at fixing min / max with gcc 4.7
Bruno Wolff III
bruno at fedoraproject.org
Thu Jan 26 04:10:07 UTC 2012
commit 766daa5bf2a9973abb6851094f8e15898910eb6d
Author: Bruno Wolff III <bruno at wolff.to>
Date: Wed Jan 25 21:51:37 2012 -0600
Another try at fixing min / max with gcc 4.7
glest-gcc47.patch | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/glest-gcc47.patch b/glest-gcc47.patch
index 3efb348..73e9cf5 100644
--- a/glest-gcc47.patch
+++ b/glest-gcc47.patch
@@ -1,10 +1,17 @@
---- shared_lib/include/graphics/math_util.h.orig 2012-01-25 21:31:09.021829452 -0600
-+++ shared_lib/include/graphics/math_util.h 2012-01-25 21:37:28.779094649 -0600
-@@ -12,6 +12,7 @@
- #ifndef _SHARED_GRAPHICS_MATHUTIL_H_
- #define _SHARED_GRAPHICS_MATHUTIL_H_
+--- shared_lib/include/graphics/math_util.h.orig 2012-01-25 21:50:15.971600870 -0600
++++ shared_lib/include/graphics/math_util.h 2012-01-25 21:51:01.480384804 -0600
+@@ -142,10 +142,10 @@
-+#include <algorithm>
- #include <cmath>
+ Rect2<T> 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));
+ }
- #include "vec.h"
+ bool isInside(const Vec2<T> &pt) const{
More information about the scm-commits
mailing list