From 1595b1fbedf5587bc7c60cc7a1156ac1bca69f59 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 7 Apr 2017 19:44:59 +1000 Subject: Prefer C++ static cast over C-style casts. --- src/Indicator.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Indicator.cxx') diff --git a/src/Indicator.cxx b/src/Indicator.cxx index 4a2d43895..18ae0f2c8 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -21,7 +21,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(int(rc.left + 0.5), int(rc.top), int(rc.right + 0.5), int(rc.bottom)); + return PRectangle::FromInts(static_cast(rc.left + 0.5), static_cast(rc.top), + static_cast(rc.right + 0.5), static_cast(rc.bottom)); } void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const { @@ -35,8 +36,8 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r surface->PenColour(sacDraw.fore); int ymid = static_cast(rc.bottom + rc.top) / 2; if (sacDraw.style == INDIC_SQUIGGLE) { - int x = int(rc.left+0.5); - const int xLast = int(rc.right+0.5); + int x = static_cast(rc.left+0.5); + const int xLast = static_cast(rc.right+0.5); int y = 0; surface->MoveTo(x, static_cast(rc.top) + y); while (x < xLast) { -- cgit v1.2.3