aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-01-28 08:56:08 +1100
committerNeil <nyamatongwe@gmail.com>2018-01-28 08:56:08 +1100
commit9d748e03134e5c15dd8cb9e8887b80dca0312b09 (patch)
tree53a2e620fee3952f3afd0d5248e862f19c35393d /src/Editor.cxx
parentcc7726eda8aadd6421e4b867b013518aee465ae9 (diff)
downloadscintilla-mirror-9d748e03134e5c15dd8cb9e8887b80dca0312b09.tar.gz
Use std::abs in preference to abs as std::abs is generic and abs casts to int
which may drop information.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 36af34685..601bc384b 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -11,8 +11,8 @@
#include <cstring>
#include <cctype>
#include <cstdio>
-
#include <cmath>
+
#include <stdexcept>
#include <string>
#include <vector>
@@ -934,7 +934,7 @@ void Editor::ScrollTo(Sci::Line line, bool moveThumb) {
// Try to optimise small scrolls
#ifndef UNDER_CE
const Sci::Line linesToMove = topLine - topLineNew;
- const bool performBlit = (abs(linesToMove) <= 10) && (paintState == notPainting);
+ const bool performBlit = (std::abs(linesToMove) <= 10) && (paintState == notPainting);
willRedrawAll = !performBlit;
#endif
SetTopLine(topLineNew);