forked from rosebudai/OpenRCT2-Web
Create repositories in OpenRCT2.c
This commit is contained in:
1 parent
7410326fcc
commit
cc227b7761
7 files changed
+40
-30
No files matched your search
@@ -626,14 +626,6 @@ IObjectRepository * CreateObjectRepository(IPlatformEnvironment * env)
|
||||
|
||||
IObjectRepository * GetObjectRepository()
|
||||
{
|
||||
if (_objectRepository == nullptr)
|
||||
{
|
||||
// TODO There should only be one platform environment which needs to be global.
|
||||
// However it should be not be used here. Instead the object repository should be
|
||||
// constructed in some initialisation method where it passes this dependency.
|
||||
IPlatformEnvironment * env = CreatePlatformEnvironment();
|
||||
CreateObjectRepository(env);
|
||||
}
|
||||
return _objectRepository.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user