diff options
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 bb268a319..ae1d56b27 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -428,21 +428,8 @@ struct System::Impl { | |||
| 428 | }; | 428 | }; |
| 429 | 429 | ||
| 430 | System::System() : impl{std::make_unique<Impl>(*this)} {} | 430 | System::System() : impl{std::make_unique<Impl>(*this)} {} |
| 431 | System::~System() = default; | ||
| 432 | |||
| 433 | System& System::GetInstance() { | ||
| 434 | if (!s_instance) { | ||
| 435 | throw std::runtime_error("Using System instance before its initialization"); | ||
| 436 | } | ||
| 437 | return *s_instance; | ||
| 438 | } | ||
| 439 | 431 | ||
| 440 | void System::InitializeGlobalInstance() { | 432 | System::~System() = default; |
| 441 | if (s_instance) { | ||
| 442 | throw std::runtime_error("Reinitializing Global System instance."); | ||
| 443 | } | ||
| 444 | s_instance = std::unique_ptr<System>(new System); | ||
| 445 | } | ||
| 446 | 433 | ||
| 447 | CpuManager& System::GetCpuManager() { | 434 | CpuManager& System::GetCpuManager() { |
| 448 | return impl->cpu_manager; | 435 | return impl->cpu_manager; |