aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Indicator.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-25 11:00:39 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-25 11:00:39 +1100
commit1cf755b51cc643240f60131a8fac5e990cfa5e9f (patch)
tree1a1a8d12e390942dc456b6df0d64d51701c1b9af /src/Indicator.cxx
parent5344ef2aee7eaca738b0bddab8d9025bf49f1137 (diff)
downloadscintilla-mirror-1cf755b51cc643240f60131a8fac5e990cfa5e9f.tar.gz
Use generic versions of ceil, floor, round, lround, trunc from <cmath>.
Diffstat (limited to 'src/Indicator.cxx')
-rw-r--r--src/Indicator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index 5ab0a7813..8db760f2b 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -25,8 +25,8 @@ using namespace Scintilla;
static PRectangle PixelGridAlign(const PRectangle &rc) {
// Move left and right side to nearest pixel to avoid blurry visuals
- return PRectangle(round(rc.left), floor(rc.top),
- round(rc.right), floor(rc.bottom));
+ return PRectangle(std::round(rc.left), std::floor(rc.top),
+ std::round(rc.right), std::floor(rc.bottom));
}
void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const {
@@ -201,10 +201,10 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
surface->FillRectangle(rcComposition, sacDraw.fore);
} else if (sacDraw.style == INDIC_POINT || sacDraw.style == INDIC_POINTCHARACTER) {
if (rcCharacter.Width() >= 0.1) {
- const XYPOSITION pixelHeight = floor(rc.Height() - 1.0f); // 1 pixel onto next line if multiphase
+ const XYPOSITION pixelHeight = std::floor(rc.Height() - 1.0f); // 1 pixel onto next line if multiphase
const XYPOSITION x = (sacDraw.style == INDIC_POINT) ? (rcCharacter.left) : ((rcCharacter.right + rcCharacter.left) / 2);
- const XYPOSITION ix = round(x);
- const XYPOSITION iy = floor(rc.top + 1.0f);
+ const XYPOSITION ix = std::round(x);
+ const XYPOSITION iy = std::floor(rc.top + 1.0f);
Point pts[] = {
Point(ix - pixelHeight, iy + pixelHeight), // Left
Point(ix + pixelHeight, iy + pixelHeight), // Right