diff options
author | Scott Talbert <swt@techie.net> | 2016-02-20 00:08:14 -0500 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2022-08-14 22:01:25 +0200 |
commit | 604252c83266414f2305f429d127799c3d9bd637 (patch) | |
tree | 1c72cd9fb4b32cc9285a1a5eb1e358bf9ca3d7a5 | |
parent | 34a4b07e2f9ecc47da4d02b353197721a9aca503 (diff) |
[PATCH] Fix STC compilation with GCC6archive/debian/0.39-5
Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
with ambiguous overloads.
Closes #17147.
Closes https://github.com/wxWidgets/wxWidgets/pull/222
Bug-Debian: https://bugs.debian.org/816571
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=112742
Gbp-Pq: Name Fix_STC_compilation_with_GCC6.patch
-rw-r--r-- | wx-scintilla/src/scintilla/src/Editor.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wx-scintilla/src/scintilla/src/Editor.cxx b/wx-scintilla/src/scintilla/src/Editor.cxx index aec7ab3..99179ba 100644 --- a/wx-scintilla/src/scintilla/src/Editor.cxx +++ b/wx-scintilla/src/scintilla/src/Editor.cxx @@ -11,6 +11,7 @@ #include <ctype.h>
#include <assert.h>
+#include <cmath>
#include <string>
#include <vector>
#include <map>
@@ -5868,9 +5869,9 @@ void Editor::GoToLine(int lineNo) { }
static bool Close(Point pt1, Point pt2) {
- if (abs(pt1.x - pt2.x) > 3)
+ if (std::abs(pt1.x - pt2.x) > 3)
return false;
- if (abs(pt1.y - pt2.y) > 3)
+ if (std::abs(pt1.y - pt2.y) > 3)
return false;
return true;
}
|