Refactor to avoid unnecessary copies (#13736)

* Refactor to avoid unnecessary copies

* Fix dangling references
This commit is contained in:
skdltmxn authored and GitHub committed 2021-01-11 18:14:15 -03:00
1 parent b58038a23f
commit 7ef4d7762f
23 files changed
+52 -40

No files matched your search

+1 -1
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);
}