From 3fe056899ac8ad4882f59e196aaa56cd31c2e547 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 14 May 2018 14:39:55 +1000 Subject: Modernize Platform.h (4) - update Surface to use string_view for text arguments. --- src/MarginView.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/MarginView.cxx') diff --git a/src/MarginView.cxx b/src/MarginView.cxx index f9d566b44..6604657f6 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -393,11 +393,11 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, } PRectangle rcNumber = rcMarker; // Right justify - const XYPOSITION width = surface->WidthText(fontLineNumber, sNumber.c_str(), static_cast(sNumber.length())); + const XYPOSITION width = surface->WidthText(fontLineNumber, sNumber); const XYPOSITION xpos = rcNumber.right - width - vs.marginNumberPadding; rcNumber.left = xpos; DrawTextNoClipPhase(surface, rcNumber, vs.styles[STYLE_LINENUMBER], - rcNumber.top + vs.maxAscent, sNumber.c_str(), static_cast(sNumber.length()), drawAll); + rcNumber.top + vs.maxAscent, sNumber, drawAll); } else if (vs.wrapVisualFlags & SC_WRAPVISUALFLAG_MARGIN) { PRectangle rcWrapMarker = rcMarker; rcWrapMarker.right -= wrapMarkerPaddingRight; -- cgit v1.2.3