From dfed7ed211a7372b4c5610ea83aa9a3611bf20be Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 23 Nov 2014 19:49:59 +0000 Subject: [PATCH] const String& to StringView --- src/commands.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.cc b/src/commands.cc index a6dbd5f7..8b88702b 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -83,7 +83,7 @@ const ParameterDesc single_optional_name_param{ static constexpr auto scopes = { "global", "buffer", "window" }; -Scope* get_scope_ifp(const String& scope, const Context& context) +Scope* get_scope_ifp(StringView scope, const Context& context) { if (prefix_match("global", scope)) return &GlobalScope::instance(); @@ -96,7 +96,7 @@ Scope* get_scope_ifp(const String& scope, const Context& context) return nullptr; } -Scope& get_scope(const String& scope, const Context& context) +Scope& get_scope(StringView scope, const Context& context) { if (auto s = get_scope_ifp(scope, context)) return *s;