diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CallTip.cxx | 6 | ||||
-rw-r--r-- | src/Indicator.cxx | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx index ffd808c66..7b322afeb 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -151,7 +151,7 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s, } else if (IsTabCharacter(s[startSeg])) { xEnd = NextTabPos(x); } else { - xEnd = x + lround(surface->WidthText(font, s + startSeg, endSeg - startSeg)); + xEnd = x + static_cast<int>(lround(surface->WidthText(font, s + startSeg, endSeg - startSeg))); if (draw) { rcClient.left = static_cast<XYPOSITION>(x); rcClient.right = static_cast<XYPOSITION>(xEnd); @@ -173,7 +173,7 @@ int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { PRectangle rcClient(1.0f, 1.0f, rcClientSize.right - 1, rcClientSize.bottom - 1); // To make a nice small call tip window, it is only sized to fit most normal characters without accents - const int ascent = lround(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font)); + const int ascent = static_cast<int>(lround(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font))); // For each line... // Draw the definition in three parts: before highlight, highlighted, after highlight @@ -282,7 +282,7 @@ PRectangle CallTip::CallTipStart(Sci::Position pos, Point pt, int textHeight, co look = newline + 1; numLines++; } - lineHeight = lround(surfaceMeasure->Height(font)); + lineHeight = static_cast<int>(lround(surfaceMeasure->Height(font))); // The returned // rectangle is aligned to the right edge of the last arrow encountered in 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<int>(rc.top), - lround(rc.right), static_cast<int>(rc.bottom)); + 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)); } 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<int>(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<int>(lround(rc.left)); + const int xLast = static_cast<int>(lround(rc.right)); int y = 0; surface->MoveTo(x, static_cast<int>(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<int>(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<int>(lround(x)); const int iy = static_cast<int>(rc.top + 1.0f); Point pts[] = { Point::FromInts(ix - pixelHeight, iy + pixelHeight), // Left |