diff options
author | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:00:39 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:00:39 +1100 |
commit | 1cf755b51cc643240f60131a8fac5e990cfa5e9f (patch) | |
tree | 1a1a8d12e390942dc456b6df0d64d51701c1b9af /src/CallTip.cxx | |
parent | 5344ef2aee7eaca738b0bddab8d9025bf49f1137 (diff) | |
download | scintilla-mirror-1cf755b51cc643240f60131a8fac5e990cfa5e9f.tar.gz |
Use generic versions of ceil, floor, round, lround, trunc from <cmath>.
Diffstat (limited to 'src/CallTip.cxx')
-rw-r--r-- | src/CallTip.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 12df236d7..0cc818d44 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -155,7 +155,7 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s, xEnd = NextTabPos(x); } else { std::string_view segText(s + startSeg, endSeg - startSeg); - xEnd = x + static_cast<int>(lround(surface->WidthText(font, segText))); + xEnd = x + static_cast<int>(std::lround(surface->WidthText(font, segText))); if (draw) { rcClient.left = static_cast<XYPOSITION>(x); rcClient.right = static_cast<XYPOSITION>(xEnd); @@ -176,7 +176,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 = static_cast<int>(lround(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font))); + const int ascent = static_cast<int>(std::round(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font))); // For each line... // Draw the definition in three parts: before highlight, highlighted, after highlight @@ -280,7 +280,7 @@ PRectangle CallTip::CallTipStart(Sci::Position pos, Point pt, int textHeight, co rectDown = PRectangle(0,0,0,0); offsetMain = insetX; // changed to right edge of any arrows const int width = PaintContents(surfaceMeasure.get(), false) + insetX; - lineHeight = static_cast<int>(lround(surfaceMeasure->Height(font))); + lineHeight = static_cast<int>(std::lround(surfaceMeasure->Height(font))); // The returned // rectangle is aligned to the right edge of the last arrow encountered in |