diff options
| author | mitchell <unknown> | 2020-01-05 22:01:07 -0500 |
|---|---|---|
| committer | mitchell <unknown> | 2020-01-05 22:01:07 -0500 |
| commit | a7b57f9b5bb481c9b5b98dda13c0e9c44d26a237 (patch) | |
| tree | 2cdcc4c9d826c3a42c47746eab16b6079e35dfbd /src/CallTip.cxx | |
| parent | c7e5af4bc7c06eaa6bb000b3f0a4569e31c9f9a9 (diff) | |
| download | scintilla-mirror-a7b57f9b5bb481c9b5b98dda13c0e9c44d26a237.tar.gz | |
Added Sci::round() and Sci::lround() for better compatibility with the default branch.
Some olders MacOSX SDKs do not have std::round() or std::lround().
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 db66878ce..a78f8cab0 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -153,7 +153,7 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s, } else if (IsTabCharacter(s[startSeg])) { xEnd = NextTabPos(x); } else { - xEnd = x + static_cast<int>(lround(surface->WidthText(font, s + startSeg, endSeg - startSeg))); + xEnd = x + static_cast<int>(Sci::lround(surface->WidthText(font, s + startSeg, endSeg - startSeg))); if (draw) { rcClient.left = static_cast<XYPOSITION>(x); rcClient.right = static_cast<XYPOSITION>(xEnd); @@ -175,7 +175,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>(round(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font))); + const int ascent = static_cast<int>(Sci::round(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font))); // For each line... // Draw the definition in three parts: before highlight, highlighted, after highlight @@ -279,7 +279,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>(Sci::lround(surfaceMeasure->Height(font))); // The returned // rectangle is aligned to the right edge of the last arrow encountered in |
