Commits
Mojca Miklavec authored dabbaa7aadb
1 + | # An upstream patch for abs() |
2 + | # |
3 + | # - https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02 |
4 + | # - https://trac.macports.org/ticket/53516 |
5 + | # - https://github.com/wxWidgets/wxWidgets/pull/222 |
6 + | --- src/stc/scintilla/src/Editor.cxx.orig |
7 + | +++ src/stc/scintilla/src/Editor.cxx |
8 + | |
9 + | #include <ctype.h> |
10 + | #include <assert.h> |
11 + | |
12 + | +#include <cmath> |
13 + | #include <string> |
14 + | #include <vector> |
15 + | #include <map> |
16 + | |
17 + | } |
18 + | |
19 + | static bool Close(Point pt1, Point pt2) { |
20 + | - if (abs(pt1.x - pt2.x) > 3) |
21 + | + if (std::abs(pt1.x - pt2.x) > 3) |
22 + | return false; |
23 + | - if (abs(pt1.y - pt2.y) > 3) |
24 + | + if (std::abs(pt1.y - pt2.y) > 3) |
25 + | return false; |
26 + | return true; |
27 + | } |