]> git.pld-linux.org Git - packages/wxWidgets.git/blob - gcc6.patch
4da3bbb03cda4f2fcc1578f5de73d153de799090
[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  }
38 --- wxWidgets-3.0.2/utils/ifacecheck/src/xmlparser.cpp~ 2014-10-06 23:33:44.000000000 +0200
39 +++ wxWidgets-3.0.2/utils/ifacecheck/src/xmlparser.cpp  2017-04-16 02:00:59.184716773 +0200
40 @@ -570,7 +570,7 @@
41              if (!parent) {
42                  wxLogError("Could not find parent '%s' of class '%s'...",
43                           m_parents[i], GetName());
44 -                return false;
45 +                return NULL;
46              }
47  
48              const wxMethod *parentMethod = parent->RecursiveUpwardFindMethod(m, allclasses);
This page took 0.023746 seconds and 2 git commands to generate.