From b167c116712ca852801d93a157e7950e1350767a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 4 Nov 2014 13:14:48 +0000 Subject: [PATCH] Use StringViews for some helper functions in selectors.cc --- src/selectors.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selectors.cc b/src/selectors.cc index d6c9110a..4a80d3d5 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -392,7 +392,7 @@ Selection select_whitespaces(const Buffer& buffer, const Selection& selection, O : utf8_range(last, first); } -static CharCount get_indent(const String& str, int tabstop) +static CharCount get_indent(StringView str, int tabstop) { CharCount indent = 0; for (auto& c : str) @@ -407,7 +407,7 @@ static CharCount get_indent(const String& str, int tabstop) return indent; } -static bool is_only_whitespaces(const String& str) +static bool is_only_whitespaces(StringView str) { auto it = str.begin(); skip_while(it, str.end(),