1 |
hasufell 12/10/29 20:14:48 |
2 |
|
3 |
Added: megaglest-3.6.0.3-gcc-4.7.patch |
4 |
Log: |
5 |
fix compilation for gcc-4.7 wrt #440134 |
6 |
|
7 |
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key E73C35B3) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 games-strategy/megaglest/files/megaglest-3.6.0.3-gcc-4.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-strategy/megaglest/files/megaglest-3.6.0.3-gcc-4.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-strategy/megaglest/files/megaglest-3.6.0.3-gcc-4.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: megaglest-3.6.0.3-gcc-4.7.patch |
16 |
=================================================================== |
17 |
From: Julian Ospald <hasufell@g.o> |
18 |
Date: Mon Oct 29 19:15:35 UTC 2012 |
19 |
Subject: fix compilation for gcc-4.7 |
20 |
|
21 |
https://bugs.gentoo.org/show_bug.cgi?id=440134 |
22 |
|
23 |
--- source/shared_lib/sources/util/util.cpp |
24 |
+++ source/shared_lib/sources/util/util.cpp |
25 |
@@ -9,6 +9,8 @@ |
26 |
// License, or (at your option) any later version |
27 |
// ============================================================== |
28 |
|
29 |
+#include <unistd.h> |
30 |
+ |
31 |
#include "util.h" |
32 |
|
33 |
#include <ctime> |
34 |
--- source/shared_lib/include/graphics/math_util.h |
35 |
+++ source/shared_lib/include/graphics/math_util.h |
36 |
@@ -184,10 +184,10 @@ |
37 |
|
38 |
Rect2<T> computeBoundingRect() const{ |
39 |
return Rect2i( |
40 |
- min(p[0].x, p[1].x), |
41 |
- min(p[0].y, p[2].y), |
42 |
- max(p[2].x, p[3].x), |
43 |
- max(p[1].y, p[3].y)); |
44 |
+ std::min(p[0].x, p[1].x), |
45 |
+ std::min(p[0].y, p[2].y), |
46 |
+ std::max(p[2].x, p[3].x), |
47 |
+ std::max(p[1].y, p[3].y)); |
48 |
} |
49 |
|
50 |
bool isInside(const Vec2<T> &pt) const{ |