forked from rosebudai/OpenRCT2-Web
Refactor to avoid unnecessary copies (#13736)
* Refactor to avoid unnecessary copies * Fix dangling references
This commit is contained in:
1 parent
b58038a23f
commit
7ef4d7762f
23 files changed
+52
-40
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user