From f3fea32a6d3f1cecb81e85d8f4726816f8542dda Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 1 May 2018 13:48:29 +1000 Subject: Use round and floor instead of casts. --- src/Indicator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(lround(rc.left)), static_cast(rc.top), - static_cast(lround(rc.right)), static_cast(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 { -- cgit v1.2.3