aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2023-04-07 22:08:55 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2023-04-07 22:08:55 +1000
commit9a8adc7fe7d845b1a8b1350436d2c012662db08a (patch)
treee54d38528cd7c78c9b66a8841d6eaa8587e867ed
parentd22a78b69f9dd04ce99e2959f0a11b449f20e174 (diff)
downloadscintilla-mirror-9a8adc7fe7d845b1a8b1350436d2c012662db08a.tar.gz
Use std::abs as adapts to argument type so avoids warning. The value is always
small enough to not overflow int.
-rw-r--r--src/PositionCache.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index 9f4e4edc7..8c0e2046b 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -461,7 +461,7 @@ bool SignificantLines::LineMayCache(Sci::Line line) const noexcept {
case LineCache::Caret:
return line == lineCaret;
case LineCache::Page:
- return (abs(line - lineCaret) < linesOnScreen) ||
+ return (std::abs(line - lineCaret) < linesOnScreen) ||
((line >= lineTop) && (line <= (lineTop + linesOnScreen)));
case LineCache::Document:
default: