diff options
| -rw-r--r-- | src/Document.cxx | 3 | ||||
| -rw-r--r-- | src/Editor.cxx | 4 | 
2 files changed, 4 insertions, 3 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index 81d022097..d2e8d7428 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -10,6 +10,7 @@  #include <cassert>  #include <cstring>  #include <cstdio> +#include <cmath>  #include <stdexcept>  #include <string> @@ -877,7 +878,7 @@ Sci::Position Document::GetRelativePositionUTF16(Sci::Position positionStart, Sc  			const Sci::Position posNext = NextPosition(pos, increment);  			if (posNext == pos)  				return INVALID_POSITION; -			if (abs(pos-posNext) > 3)	// 4 byte character = 2*UTF16. +			if (std::abs(pos-posNext) > 3)	// 4 byte character = 2*UTF16.  				characterOffset -= increment;  			pos = posNext;  			characterOffset -= increment; 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); | 
