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/Editor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 80cdbc97a..36ebc5cea 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1792,7 +1792,7 @@ int Editor::TextWidth(int style, const char *text) { RefreshStyleData(); AutoSurface surface(this); if (surface) { - return static_cast(surface->WidthText(vs.styles[style].font, text, static_cast(strlen(text)))); + return static_cast(surface->WidthText(vs.styles[style].font, text)); } else { return 1; } -- cgit v1.2.3