Small code tweak
This commit is contained in:
parent
116ea7364a
commit
5b94b73152
|
@ -227,12 +227,11 @@ void Client::check_buffer_fs_timestamp()
|
||||||
reload_buffer(context(), filename);
|
reload_buffer(context(), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
const String& Client::get_env_var(const String& name) const
|
StringView Client::get_env_var(const String& name) const
|
||||||
{
|
{
|
||||||
auto it = m_env_vars.find(name);
|
auto it = m_env_vars.find(name);
|
||||||
static String empty{};
|
|
||||||
if (it == m_env_vars.end())
|
if (it == m_env_vars.end())
|
||||||
return empty;
|
return {};
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
|
|
||||||
void change_buffer(Buffer& buffer);
|
void change_buffer(Buffer& buffer);
|
||||||
|
|
||||||
const String& get_env_var(const String& name) const;
|
StringView get_env_var(const String& name) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void on_option_changed(const Option& option) override;
|
void on_option_changed(const Option& option) override;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user