Use range based find_if wrapper for finding shell env vars
This commit is contained in:
parent
d9b1ee13d9
commit
4495aefea6
|
@ -301,9 +301,7 @@ void ShellManager::register_env_var(StringView str, bool prefix,
|
|||
|
||||
String ShellManager::get_val(StringView name, const Context& context) const
|
||||
{
|
||||
auto env_var = std::find_if(
|
||||
m_env_vars.begin(), m_env_vars.end(),
|
||||
[name](const EnvVarDesc& desc) {
|
||||
auto env_var = find_if(m_env_vars, [name](const EnvVarDesc& desc) {
|
||||
return desc.prefix ? prefix_match(name, desc.str) : name == desc.str;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user