1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Fix: call to std::set_difference with unordered lists

This commit is contained in:
Hielke Morsink
2022-04-02 23:03:07 +02:00
committed by GitHub
parent e2170a995f
commit 5c4675a150

View File

@@ -460,6 +460,11 @@ void ScriptEngine::RefreshPlugins()
plugins.push_back(std::string(plugin->GetPath()));
}
}
// The lists need to be sorted for std::set_difference to work properly
std::sort(pluginFiles.begin(), pluginFiles.end());
std::sort(plugins.begin(), plugins.end());
std::set_difference(
plugins.begin(), plugins.end(), pluginFiles.begin(), pluginFiles.end(), std::back_inserter(removedPlugins));
std::set_difference(