Blame wxGTK3-3.0.2-stc-gcc6.patch

0c7f9b3
From 73e9e18ea09ffffcaac50237def0d9728a213c02 Mon Sep 17 00:00:00 2001
0c7f9b3
From: Scott Talbert <swt@techie.net>
0c7f9b3
Date: Sat, 20 Feb 2016 00:08:14 -0500
0c7f9b3
Subject: [PATCH] Fix STC compilation with GCC6
0c7f9b3
0c7f9b3
Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
0c7f9b3
with ambiguous overloads.
0c7f9b3
0c7f9b3
Closes #17147.
0c7f9b3
0c7f9b3
Closes https://github.com/wxWidgets/wxWidgets/pull/222
0c7f9b3
---
0c7f9b3
 src/stc/scintilla/src/Editor.cxx | 5 +++--
0c7f9b3
 1 file changed, 3 insertions(+), 2 deletions(-)
0c7f9b3
0c7f9b3
diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx
0c7f9b3
index cd72953..2081df2 100644
0c7f9b3
--- a/src/stc/scintilla/src/Editor.cxx
0c7f9b3
+++ b/src/stc/scintilla/src/Editor.cxx
0c7f9b3
@@ -11,6 +11,7 @@
0c7f9b3
 #include <ctype.h>
0c7f9b3
 #include <assert.h>
0c7f9b3
 
0c7f9b3
+#include <cmath>
0c7f9b3
 #include <string>
0c7f9b3
 #include <vector>
0c7f9b3
 #include <map>
0c7f9b3
@@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) {
0c7f9b3
 }
0c7f9b3
 
0c7f9b3
 static bool Close(Point pt1, Point pt2) {
0c7f9b3
-	if (abs(pt1.x - pt2.x) > 3)
0c7f9b3
+	if (std::abs(pt1.x - pt2.x) > 3)
0c7f9b3
 		return false;
0c7f9b3
-	if (abs(pt1.y - pt2.y) > 3)
0c7f9b3
+	if (std::abs(pt1.y - pt2.y) > 3)
0c7f9b3
 		return false;
0c7f9b3
 	return true;
0c7f9b3
 }