From 278cbc5ff10e7fbcb4970530f5fd00acc3b6556f Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 14 Nov 2018 11:30:17 +0100 Subject: [PATCH] env_universal_common: Constref env_var_t as well --- src/env_universal_common.cpp | 2 +- src/env_universal_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/env_universal_common.cpp b/src/env_universal_common.cpp index 7388b4825..7fd8bf1e9 100644 --- a/src/env_universal_common.cpp +++ b/src/env_universal_common.cpp @@ -263,7 +263,7 @@ maybe_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. diff --git a/src/env_universal_common.h b/src/env_universal_common.h index d418db7cc..6e055db68 100644 --- a/src/env_universal_common.h +++ b/src/env_universal_common.h @@ -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.