forked from rosebudai/OpenRCT2-Web
Do not return shared_ptr for LocalisationService
GetLocalisationService is currently used a lot, so remove overhead of shared_ptr copy.
This commit is contained in:
1 parent
ad6ebd646c
commit
d1cbf998a0
5 files changed
+16
-16
No files matched your search
@@ -667,9 +667,9 @@ const rct_object_entry * object_list_find(rct_object_entry * entry)
|
||||
void object_list_load()
|
||||
{
|
||||
auto context = GetContext();
|
||||
const auto localisationService = context->GetLocalisationService();
|
||||
const auto& localisationService = context->GetLocalisationService();
|
||||
auto objectRepository = context->GetObjectRepository();
|
||||
objectRepository->LoadOrConstruct(localisationService->GetCurrentLanguage());
|
||||
objectRepository->LoadOrConstruct(localisationService.GetCurrentLanguage());
|
||||
|
||||
IObjectManager * objectManager = context->GetObjectManager();
|
||||
objectManager->UnloadAll();
|
||||
|
||||
Reference in new issue
Block a user