mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
Refactor to use push_back more efficient (#13726)
This commit is contained in:
@@ -48,8 +48,7 @@ uint32_t HookEngine::Subscribe(HOOK_TYPE type, std::shared_ptr<Plugin> owner, co
|
||||
{
|
||||
auto& hookList = GetHookList(type);
|
||||
auto cookie = _nextCookie++;
|
||||
Hook hook(cookie, owner, function);
|
||||
hookList.Hooks.push_back(hook);
|
||||
hookList.Hooks.emplace_back(cookie, owner, function);
|
||||
return cookie;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user