e2a21ccfd6
```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 ```
12 lines
433 B
Diff
12 lines
433 B
Diff
--- a/feature.cpp
|
|
+++ b/feature.cpp
|
|
@@ -42,7 +42,8 @@ float minimum_distance(const Node *first, const Node *last,
|
|
|
|
const float a = last->x - first->x;
|
|
const float b = last->y - first->y;
|
|
- const float c = last->y * first->x - last->x * first->y;
|
|
+ const float c = static_cast<double>(last->y * first->x)
|
|
+ - static_cast<double>(last->x * first->y);
|
|
|
|
float max = -1.0;
|
|
for (const Node *n = first; n != last; ++n) {
|