From:
[email protected]
Package: trophy
Severity: normal
Tags: patch
When building 'trophy' with gcc-3.4 I get the following error:
g++ -c -O3 -Wall -DPKGDATADIR=\"/usr/share/games/trophy\" caimagemanipulation.cpp -o caimagemanipulation.o
caimagemanipulation.cpp: In static member function `static float CAImageManipulation::getDistance(float, float, float, float)':
caimagemanipulation.cpp:551: error: `sqrt' is not a member of `std'
make[1]: *** [caimagemanipulation.o] Error 1
make[1]: Leaving directory `/trophy-1.1.3/trophy'
With the attached patch 'trophy' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/trophy-1.1.3/trophy/caimagemanipulation.cpp ./trophy/caimagemanipulation.cpp
--- ../tmp-orig/trophy-1.1.3/trophy/caimagemanipulation.cpp 2003-05-06 21:41:42.000000000 +0200
+++ ./trophy/caimagemanipulation.cpp 2004-08-17 08:44:23.487775169 +0200
@@ -548,7 +548,7 @@
float yd2 = (y2-y1)*(y2-y1);
float d = xd2+yd2;
if(d<0.0) d*=-1.0;
- return(std::sqrt(d));
+ return(sqrt(d));
}
diff -urN ../tmp-orig/trophy-1.1.3/trophy/camath.cpp ./trophy/camath.cpp
--- ../tmp-orig/trophy-1.1.3/trophy/camath.cpp 2003-01-10 20:48:23.000000000 +0100
+++ ./trophy/camath.cpp 2004-08-17 08:44:47.018198001 +0200
@@ -63,7 +63,7 @@
float yd2 = (y2-y1)*(y2-y1);
float d = xd2+yd2;
if(d<0.0) d*=-1.0;
- return(std::sqrt(d));
+ return(sqrt(d));
}
diff -urN ../tmp-orig/trophy-1.1.3/trophy/catrophy.cpp ./trophy/catrophy.cpp --- ../tmp-orig/trophy-1.1.3/trophy/catrophy.cpp 2003-05-06 21:50:45.000000000 +0200
+++ ./trophy/catrophy.cpp 2004-08-17 08:45:20.284140809 +0200
@@ -290,7 +290,7 @@
path = mainPath + "price";
carType[