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/ViewStyle.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ViewStyle.cxx') diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 1a95450ce..2700fb016 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -80,7 +80,7 @@ void FontRealised::Realise(Surface &surface, int zoomLevel, int technology, cons descent = static_cast(surface.Descent(font)); capitalHeight = surface.Ascent(font) - surface.InternalLeading(font); aveCharWidth = surface.AverageCharWidth(font); - spaceWidth = surface.WidthText(font, " ", 1); + spaceWidth = surface.WidthText(font, " "); } ViewStyle::ViewStyle() : markers(MARKER_MAX + 1), indicators(INDIC_MAX + 1) { @@ -367,7 +367,7 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) { controlCharWidth = 0.0; if (controlCharSymbol >= 32) { const char cc[2] = { static_cast(controlCharSymbol), '\0' }; - controlCharWidth = surface.WidthText(styles[STYLE_CONTROLCHAR].font, cc, 1); + controlCharWidth = surface.WidthText(styles[STYLE_CONTROLCHAR].font, cc); } CalculateMarginWidthAndMask(); -- cgit v1.2.3