diff options
Diffstat (limited to 'src/common/param_package.cpp')
| -rw-r--r-- | src/common/param_package.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/param_package.cpp b/src/common/param_package.cpp index 02399b336..9526ca0c6 100644 --- a/src/common/param_package.cpp +++ b/src/common/param_package.cpp | |||
| @@ -3,7 +3,9 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <array> | 5 | #include <array> |
| 6 | #include <utility> | ||
| 6 | #include <vector> | 7 | #include <vector> |
| 8 | |||
| 7 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 8 | #include "common/param_package.h" | 10 | #include "common/param_package.h" |
| 9 | #include "common/string_util.h" | 11 | #include "common/string_util.h" |
| @@ -36,7 +38,7 @@ ParamPackage::ParamPackage(const std::string& serialized) { | |||
| 36 | part = Common::ReplaceAll(part, ESCAPE_CHARACTER_ESCAPE, {ESCAPE_CHARACTER}); | 38 | part = Common::ReplaceAll(part, ESCAPE_CHARACTER_ESCAPE, {ESCAPE_CHARACTER}); |
| 37 | } | 39 | } |
| 38 | 40 | ||
| 39 | Set(key_value[0], key_value[1]); | 41 | Set(key_value[0], std::move(key_value[1])); |
| 40 | } | 42 | } |
| 41 | } | 43 | } |
| 42 | 44 | ||
| @@ -102,8 +104,8 @@ float ParamPackage::Get(const std::string& key, float default_value) const { | |||
| 102 | } | 104 | } |
| 103 | } | 105 | } |
| 104 | 106 | ||
| 105 | void ParamPackage::Set(const std::string& key, const std::string& value) { | 107 | void ParamPackage::Set(const std::string& key, std::string value) { |
| 106 | data.insert_or_assign(key, value); | 108 | data.insert_or_assign(key, std::move(value)); |
| 107 | } | 109 | } |
| 108 | 110 | ||
| 109 | void ParamPackage::Set(const std::string& key, int value) { | 111 | void ParamPackage::Set(const std::string& key, int value) { |