const String& to StringView
This commit is contained in:
parent
88def85d77
commit
dfed7ed211
|
@ -83,7 +83,7 @@ const ParameterDesc single_optional_name_param{
|
||||||
|
|
||||||
static constexpr auto scopes = { "global", "buffer", "window" };
|
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))
|
if (prefix_match("global", scope))
|
||||||
return &GlobalScope::instance();
|
return &GlobalScope::instance();
|
||||||
|
@ -96,7 +96,7 @@ Scope* get_scope_ifp(const String& scope, const Context& context)
|
||||||
return nullptr;
|
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))
|
if (auto s = get_scope_ifp(scope, context))
|
||||||
return *s;
|
return *s;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user