blob: 269d1d483d34af62289f25e1f5967b5909aa48d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
diff -ruN Wx-Scintilla-0.39.orig/wx-scintilla/src/scintilla/src/Editor.cxx Wx-Scintilla-0.39/wx-scintilla/src/scintilla/src/Editor.cxx
--- Wx-Scintilla-0.39.orig/wx-scintilla/src/scintilla/src/Editor.cxx 2012-09-04 12:20:46.000000000 +0200
+++ Wx-Scintilla-0.39/wx-scintilla/src/scintilla/src/Editor.cxx 2017-04-25 01:20:51.586427196 +0200
@@ -11,6 +11,7 @@
#include <ctype.h>
#include <assert.h>
+#include <cmath>
#include <string>
#include <vector>
#include <map>
@@ -989,7 +990,7 @@
// Try to optimise small scrolls
#ifndef UNDER_CE
int linesToMove = topLine - topLineNew;
- bool performBlit = (abs(linesToMove) <= 10) && (paintState == notPainting);
+ bool performBlit = (std::abs(linesToMove) <= 10) && (paintState == notPainting);
willRedrawAll = !performBlit;
#endif
SetTopLine(topLineNew);
@@ -5868,9 +5869,9 @@
}
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;
}
|