瀏覽代碼

Remove unused `pSharedEnvironment` pointer from CrySystem

Signed-off-by: Chris Burel <[email protected]>
Chris Burel 3 年之前
父節點
當前提交
31d3b02313

+ 0 - 2
Code/Editor/GameEngine.cpp

@@ -356,8 +356,6 @@ AZ::Outcome<void, AZStd::string> CGameEngine::Init(
     sip.bTestMode = bTestMode;
     sip.hInstance = nullptr;
 
-    sip.pSharedEnvironment = AZ::Environment::GetInstance();
-
 #ifdef AZ_PLATFORM_MAC
     // Create a hidden QWidget. Would show a black window on macOS otherwise.
     auto window = new QWidget();

+ 0 - 1
Code/LauncherUnified/Launcher.cpp

@@ -474,7 +474,6 @@ namespace O3DELauncher
         azstrncpy(systemInitParams.szSystemCmdLine, sizeof(systemInitParams.szSystemCmdLine),
             mainInfo.m_commandLine, mainInfo.m_commandLineLen);
 
-        systemInitParams.pSharedEnvironment = AZ::Environment::GetInstance();
         systemInitParams.sLogFileName = GetLogFilename();
         systemInitParams.hInstance = mainInfo.m_instance;
         systemInitParams.hWnd = mainInfo.m_window;

+ 0 - 7
Code/Legacy/CryCommon/ISystem.h

@@ -468,8 +468,6 @@ namespace AZ
     } // namespace Internal
 } // namespace AZ
 
-typedef AZ::Internal::EnvironmentInterface SharedEnvironmentInstance;
-
 // Description:
 //  Structure passed to Init method of ISystem interface.
 struct SSystemInitParams
@@ -497,8 +495,6 @@ struct SSystemInitParams
 
     ISystem* pSystem;                                           // Pointer to existing ISystem interface, it will be reused if not NULL.
 
-    SharedEnvironmentInstance* pSharedEnvironment;
-
     // Summary:
     //  Initialization defaults.
     SSystemInitParams()
@@ -524,8 +520,6 @@ struct SSystemInitParams
         bToolMode = false;
 
         pSystem = NULL;
-
-        pSharedEnvironment = nullptr;
     }
 };
 
@@ -598,7 +592,6 @@ struct SSystemGlobalEnvironment
     ISystem*                   pSystem = nullptr;
     ILog*                      pLog;
     IMovieSystem*              pMovieSystem;
-    SharedEnvironmentInstance*      pSharedEnvironment;
 
 #if defined(AZ_RESTRICTED_PLATFORM)
     #define AZ_RESTRICTED_SECTION ISYSTEM_H_SECTION_4

+ 1 - 1
Code/Legacy/CrySystem/DllMain.cpp

@@ -70,7 +70,7 @@ ISystem* CreateSystemInterface(const SSystemInitParams& startupParams)
 {
     CSystem* pSystem = NULL;
 
-    pSystem = new CSystem(startupParams.pSharedEnvironment);
+    pSystem = new CSystem();
     ModuleInitISystem(pSystem, "CrySystem");
 
 #if defined(AZ_RESTRICTED_PLATFORM)

+ 1 - 9
Code/Legacy/CrySystem/System.cpp

@@ -168,17 +168,10 @@ namespace
 /////////////////////////////////////////////////////////////////////////////////
 // System Implementation.
 //////////////////////////////////////////////////////////////////////////
-CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment)
+CSystem::CSystem()
 {
     CrySystemRequestBus::Handler::BusConnect();
 
-    if (!pSharedEnvironment)
-    {
-        CryFatalError("No shared environment instance provided. "
-            "Cross-module sharing of EBuses and allocators "
-            "is not possible.");
-    }
-
     m_systemGlobalState = ESYSTEM_GLOBAL_STATE_UNKNOWN;
     m_iHeight = 0;
     m_iWidth = 0;
@@ -204,7 +197,6 @@ CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment)
     m_env.bIgnoreAllAsserts = false;
     m_env.bNoAssertDialog = false;
 
-    m_env.pSharedEnvironment = pSharedEnvironment;
     //////////////////////////////////////////////////////////////////////////
 
     m_sysNoUpdate = NULL;

+ 1 - 1
Code/Legacy/CrySystem/System.h

@@ -129,7 +129,7 @@ class CSystem
     , public CrySystemRequestBus::Handler
 {
 public:
-    CSystem(SharedEnvironmentInstance* pSharedEnvironment);
+    CSystem();
     ~CSystem();
 
     static void OnLanguageCVarChanged(ICVar* language);