Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wxWidgets-3.0: upstream patch for abs()
This upstream patch fixes a build failure with some newer compilers. Closes: https://trac.macports.org/ticket/53516 See: wxWidgets/wxWidgets#222
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
graphics/wxWidgets-3.0/files/patch-upstream-src-stc-scintilla-src-Editor.cxx.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# An upstream patch for abs() | ||
# | ||
# - https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02 | ||
# - https://trac.macports.org/ticket/53516 | ||
# - https://github.com/wxWidgets/wxWidgets/pull/222 | ||
--- src/stc/scintilla/src/Editor.cxx.orig | ||
+++ src/stc/scintilla/src/Editor.cxx | ||
@@ -11,6 +11,7 @@ | ||
#include <ctype.h> | ||
#include <assert.h> | ||
|
||
+#include <cmath> | ||
#include <string> | ||
#include <vector> | ||
#include <map> | ||
@@ -5841,9 +5842,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; | ||
} |