aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-01 13:48:29 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-01 13:48:29 +1000
commit1bf575521e02bb0f981565502a900a8df2be2e4a (patch)
tree221e158b6b020f7e5c3b1cb11941780cfe515dfc
parentcbaf771bba7302c98ec5dc8a6374b9a4d59351ff (diff)
downloadscintilla-mirror-1bf575521e02bb0f981565502a900a8df2be2e4a.tar.gz
Backport: Use round and floor instead of casts.
Backport of changeset 6771:d0170ad7383b.
-rw-r--r--src/Indicator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index 077d12740..a18238cde 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -23,8 +23,8 @@ using namespace Scintilla;
static PRectangle PixelGridAlign(const PRectangle &rc) {
// Move left and right side to nearest pixel to avoid blurry visuals
- return PRectangle::FromInts(static_cast<int>(lround(rc.left)), static_cast<int>(rc.top),
- static_cast<int>(lround(rc.right)), static_cast<int>(rc.bottom));
+ return PRectangle(round(rc.left), floor(rc.top),
+ round(rc.right), floor(rc.bottom));
}
void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const {