env_universal_common: Constref env_var_t as well

This commit is contained in:
Fabian Homborg 2018-11-14 11:30:17 +01:00
parent 8343e61795
commit 278cbc5ff1
2 changed files with 2 additions and 2 deletions

View file

@ -263,7 +263,7 @@ maybe_t<env_var_t::env_var_flags_t> env_universal_t::get_flags(const wcstring &n
return none();
}
void env_universal_t::set_internal(const wcstring &key, env_var_t var, bool overwrite) {
void env_universal_t::set_internal(const wcstring &key, const env_var_t &var, bool overwrite) {
ASSERT_IS_LOCKED(lock);
if (!overwrite && this->modified.find(key) != this->modified.end()) {
// This value has been modified and we're not overwriting it. Skip it.

View file

@ -56,7 +56,7 @@ class env_universal_t {
bool load_from_path(const wcstring &path, callback_data_list_t &callbacks);
void load_from_fd(int fd, callback_data_list_t &callbacks);
void set_internal(const wcstring &key, env_var_t var, bool overwrite);
void set_internal(const wcstring &key, const env_var_t &var, bool overwrite);
bool remove_internal(const wcstring &name);
// Functions concerned with saving.