void-packages/srcpkgs/OpenXcom/patches/fix-gcc6-ambigous_abs.patch
2016-10-03 16:41:21 +02:00

19 lines
417 B
Diff

Disambiguate abs() for gcc6
--- src/Geoscape/Globe.cpp 2014-06-13 21:14:43.000000000 +0200
+++ src/Geoscape/Globe.cpp 2016-10-03 16:35:38.988290974 +0200
@@ -1390,12 +1390,12 @@
if (fabs(sx)<0.01)
{
- seg = abs( sy/(2*M_PI)*48 );
+ seg = abs((int)( sy/(2*M_PI)*48 ));
if (seg == 0) ++seg;
}
else
{
- seg = abs( sx/(2*M_PI)*96 );
+ seg = abs((int)( sx/(2*M_PI)*96 ));
if (seg == 0) ++seg;
}