]> git.pld-linux.org Git - packages/wxWidgets.git/blob - gcc6.patch
- fix building with gcc 6.x
[packages/wxWidgets.git] / gcc6.patch
1 commit 73e9e18ea09ffffcaac50237def0d9728a213c02
2 Author: Scott Talbert <swt@techie.net>
3 Date:   Sat Feb 20 00:08:14 2016 -0500
4
5     Fix STC compilation with GCC6
6     
7     Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
8     with ambiguous overloads.
9     
10     Closes #17147.
11     
12     Closes https://github.com/wxWidgets/wxWidgets/pull/222
13
14 diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx
15 index cd72953a..2081df28 100644
16 --- a/src/stc/scintilla/src/Editor.cxx
17 +++ b/src/stc/scintilla/src/Editor.cxx
18 @@ -11,6 +11,7 @@
19  #include <ctype.h>
20  #include <assert.h>
21  
22 +#include <cmath>
23  #include <string>
24  #include <vector>
25  #include <map>
26 @@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) {
27  }
28  
29  static bool Close(Point pt1, Point pt2) {
30 -       if (abs(pt1.x - pt2.x) > 3)
31 +       if (std::abs(pt1.x - pt2.x) > 3)
32                 return false;
33 -       if (abs(pt1.y - pt2.y) > 3)
34 +       if (std::abs(pt1.y - pt2.y) > 3)
35                 return false;
36         return true;
37  }
This page took 0.027342 seconds and 3 git commands to generate.