From 24ebee4c40fff56602bd786d0c1291041a05a6f9 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Fri, 20 Apr 2018 11:40:07 +1000 Subject: Undo part of last change as Xcode Clang doesn't like assigning long to int without cast. --- src/Indicator.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Indicator.cxx') diff --git a/src/Indicator.cxx b/src/Indicator.cxx index eff9b558e..077d12740 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(lround(rc.left), static_cast(rc.top), - lround(rc.right), static_cast(rc.bottom)); + return PRectangle::FromInts(static_cast(lround(rc.left)), static_cast(rc.top), + static_cast(lround(rc.right)), static_cast(rc.bottom)); } void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const { @@ -38,8 +38,8 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r surface->PenColour(sacDraw.fore); const int ymid = static_cast(rc.bottom + rc.top) / 2; if (sacDraw.style == INDIC_SQUIGGLE) { - int x = lround(rc.left); - const int xLast = lround(rc.right); + int x = static_cast(lround(rc.left)); + const int xLast = static_cast(lround(rc.right)); int y = 0; surface->MoveTo(x, static_cast(rc.top) + y); while (x < xLast) { @@ -177,7 +177,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r if (rcCharacter.Width() >= 0.1) { const int pixelHeight = static_cast(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 int ix = lround(x); + const int ix = static_cast(lround(x)); const int iy = static_cast(rc.top + 1.0f); Point pts[] = { Point::FromInts(ix - pixelHeight, iy + pixelHeight), // Left -- cgit v1.2.3