mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 14:00:16 +02:00
FileManagement: Use emplace instead of insert for set
These are cases where the string can be directly constructed internally instead of being copied/moved.
This commit is contained in:
1 parent
b6cbb23781
commit
987fc925ee
1 file changed
+2
-2
@@ -123,10 +123,10 @@ void FileManager::LoadThunkDatabase(fextl::unordered_map<fextl::string, ThunkDBO
|
||||
} else if (ItemName == "Depends") {
|
||||
jsonType_t PropertyType = json_getType(LibraryItem);
|
||||
if (PropertyType == JSON_TEXT) {
|
||||
DBObject->second.Depends.insert(json_getValue(LibraryItem));
|
||||
DBObject->second.Depends.emplace(json_getValue(LibraryItem));
|
||||
} else if (PropertyType == JSON_ARRAY) {
|
||||
for (const json_t* Depend = json_getChild(LibraryItem); Depend != nullptr; Depend = json_getSibling(Depend)) {
|
||||
DBObject->second.Depends.insert(json_getValue(Depend));
|
||||
DBObject->second.Depends.emplace(json_getValue(Depend));
|
||||
}
|
||||
}
|
||||
} else if (ItemName == "Overlay") {
|
||||
|
||||
Reference in new issue
Block a user