ec4c2d75fa
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
19 lines
421 B
Diff
19 lines
421 B
Diff
Disambiguate abs() for gcc6
|
|
|
|
--- a/src/Geoscape/Globe.cpp 2014-06-13 21:14:43.000000000 +0200
|
|
+++ b/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;
|
|
}
|
|
|