void-packages/srcpkgs/OpenXcom/patches/fix-gcc6-ambigous_abs.patch

20 lines
417 B
Diff
Raw Normal View History

2016-10-03 16:41:08 +02:00
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;
}