summaryrefslogtreecommitdiffstats
path: root/src/common/param_package.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/param_package.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/param_package.cpp b/src/common/param_package.cpp
index bec58c698..02399b336 100644
--- a/src/common/param_package.cpp
+++ b/src/common/param_package.cpp
@@ -103,15 +103,15 @@ float ParamPackage::Get(const std::string& key, float default_value) const {
}
void ParamPackage::Set(const std::string& key, const std::string& value) {
- data[key] = value;
+ data.insert_or_assign(key, value);
}
void ParamPackage::Set(const std::string& key, int value) {
- data[key] = std::to_string(value);
+ data.insert_or_assign(key, std::to_string(value));
}
void ParamPackage::Set(const std::string& key, float value) {
- data[key] = std::to_string(value);
+ data.insert_or_assign(key, std::to_string(value));
}
bool ParamPackage::Has(const std::string& key) const {