Config: Make lookup map assignment match behavior of comment

emplace() only performs an insertion or assignment if the key doesn't
already exist within the map, which is at odds with what the comment
above the line indicates should happen.

insert_or_assign() better models what the comment indicates.
This commit is contained in:
Lioncache committed 2021-03-30 11:51:52 -04:00
1 parent dd7c78dcd7
commit 4b11dcb72a
1 file changed
+1 -1
+1 -1
View File
@@ -89,7 +89,7 @@ namespace FEXCore::Config {
auto Value = std::string(EnvVar.begin() + ItEq + 1, EnvVar.end());
// Add the key to the map, overwriting whatever previous value was there
LookupMap.emplace(std::move(Key), std::move(Value));
LookupMap.insert_or_assign(std::move(Key), std::move(Value));
}
};