mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 09:00:40 +02:00
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:
1 parent
dd7c78dcd7
commit
4b11dcb72a
1 file changed
+1
-1
+1
-1
@@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user