diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-14 14:39:55 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-14 14:39:55 +1000 |
commit | 3fe056899ac8ad4882f59e196aaa56cd31c2e547 (patch) | |
tree | dcbd61fefbf0dad1472713d890b7c9d6fc8d4814 /src/CallTip.cxx | |
parent | c4aa7826f3d2178e39e5bff2f6886d7d3d3f46d7 (diff) | |
download | scintilla-mirror-3fe056899ac8ad4882f59e196aaa56cd31c2e547.tar.gz |
Modernize Platform.h (4) - update Surface to use string_view for text arguments.
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 2eab1146f..437933af9 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -154,13 +154,13 @@ 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))); + std::string_view segText(s + startSeg, endSeg - startSeg); + xEnd = x + static_cast<int>(lround(surface->WidthText(font, segText))); if (draw) { rcClient.left = static_cast<XYPOSITION>(x); rcClient.right = static_cast<XYPOSITION>(xEnd); surface->DrawTextTransparent(rcClient, font, static_cast<XYPOSITION>(ytext), - s+startSeg, endSeg - startSeg, - highlight ? colourSel : colourUnSel); + segText, highlight ? colourSel : colourUnSel); } } x = xEnd; |