1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Refactor to avoid unnecessary copies (#13736)

* Refactor to avoid unnecessary copies

* Fix dangling references
This commit is contained in:
skdltmxn
2021-01-12 06:14:15 +09:00
committed by GitHub
parent b58038a23f
commit 7ef4d7762f
23 changed files with 52 additions and 40 deletions

View File

@@ -492,7 +492,7 @@ void ScriptEngine::StopPlugin(std::shared_ptr<Plugin> plugin)
RemoveIntervals(plugin);
RemoveSockets(plugin);
_hookEngine.UnsubscribeAll(plugin);
for (auto callback : _pluginStoppedSubscriptions)
for (const auto& callback : _pluginStoppedSubscriptions)
{
callback(plugin);
}