diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-10-14 14:21:15 -0400 |
|---|---|---|
| committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-10-15 17:34:48 -0400 |
| commit | 3de2a8ba2c4bb172316223149616903b440aa38b (patch) | |
| tree | 633d5621300ec64c6ed2a2e7cfdff587d5462c0a /src/core/core.cpp | |
| parent | c6ef5e4f5c99f9be11cba2c0cd353be66888016c (diff) | |
core: Remove static system instance
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index bb268a3197..ae1d56b27c 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -428,21 +428,8 @@ struct System::Impl { }; System::System() : impl{std::make_unique<Impl>(*this)} {} -System::~System() = default; - -System& System::GetInstance() { - if (!s_instance) { - throw std::runtime_error("Using System instance before its initialization"); - } - return *s_instance; -} -void System::InitializeGlobalInstance() { - if (s_instance) { - throw std::runtime_error("Reinitializing Global System instance."); - } - s_instance = std::unique_ptr<System>(new System); -} +System::~System() = default; CpuManager& System::GetCpuManager() { return impl->cpu_manager; |
