logging: Address some issues

This commit is contained in:
GPUCode 2023-06-24 18:30:13 +03:00
parent 9c3e2d0f50
commit ba98bf058a
11 changed files with 19 additions and 34 deletions

View file

@ -52,6 +52,8 @@
namespace Core {
/*static*/ System System::s_instance;
template <>
Core::System& Global() {
return System::GetInstance();
@ -69,20 +71,6 @@ Core::Timing& Global() {
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::ResultStatus System::RunLoop(bool tight_loop) {
status = ResultStatus::Success;
if (!IsPoweredOn()) {