aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/HeaderOrder.txt1
-rw-r--r--src/Editor.cxx6
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/HeaderOrder.txt b/scripts/HeaderOrder.txt
index e9c88bb3f..4ab980cb4 100644
--- a/scripts/HeaderOrder.txt
+++ b/scripts/HeaderOrder.txt
@@ -20,6 +20,7 @@
#include <cstring>
#include <cctype>
#include <cstdio>
+#include <cmath>
// C++ standard library
#include <stdexcept>
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 0fba257be..4902dbdc8 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -8,10 +8,10 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <math.h>
#include <assert.h>
#include <ctype.h>
+#include <cmath>
#include <stdexcept>
#include <string>
#include <vector>
@@ -3787,9 +3787,9 @@ void Editor::GoToLine(int lineNo) {
}
static bool Close(Point pt1, Point pt2, Point threshold) {
- if (abs(pt1.x - pt2.x) > threshold.x)
+ if (std::abs(pt1.x - pt2.x) > threshold.x)
return false;
- if (abs(pt1.y - pt2.y) > threshold.y)
+ if (std::abs(pt1.y - pt2.y) > threshold.y)
return false;
return true;
}