summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-20 23:12:24 +0200
committerLioncash <mathew1800@gmail.com>2018-07-20 23:24:06 +0200
commit6279c2dcf43fb3f4749136b92744d0481e4cf0aa (patch)
tree5481381f6bd12189653b7ee06ccefe2cee0b9fa1 /src
parentparam_package: Get rid of file-static std::string construction (diff)
downloadyuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar
yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar.gz
yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar.bz2
yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar.lz
yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar.xz
yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar.zst
yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.zip
Diffstat (limited to 'src')
-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 {