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:
Lioncache committed 2025-10-09 22:02:06 -04:00
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") {