diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-20 17:17:26 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-20 17:24:06 -0400 |
commit | 3268321f4be987aab18c14f3b3ee478f46c7fe38 (patch) | |
tree | c74af88f19aa1e0e6215f9c33becbf38eb3f2149 /src/common/param_package.h | |
parent | 6279c2dcf43fb3f4749136b92744d0481e4cf0aa (diff) |
param_package: Take std::string by value in string-based Set() function
Allows avoiding string copies by letting the strings be moved into the
function calls.
Diffstat (limited to 'src/common/param_package.h')
-rw-r--r-- | src/common/param_package.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/param_package.h b/src/common/param_package.h index c4c11b221..7842cd4ef 100644 --- a/src/common/param_package.h +++ b/src/common/param_package.h @@ -28,7 +28,7 @@ public: std::string Get(const std::string& key, const std::string& default_value) const; int Get(const std::string& key, int default_value) const; float Get(const std::string& key, float default_value) const; - void Set(const std::string& key, const std::string& value); + void Set(const std::string& key, std::string value); void Set(const std::string& key, int value); void Set(const std::string& key, float value); bool Has(const std::string& key) const; |