mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 13:25:45 +00:00
core: Make System's default constructor private
This makes it a compilation error to construct additional instances of the System class directly, preventing accidental wasteful constructions over and over.
This commit is contained in:
parent
e72928762f
commit
74185c108e
2 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,8 @@ namespace Core {
|
||||||
|
|
||||||
/*static*/ System System::s_instance;
|
/*static*/ System System::s_instance;
|
||||||
|
|
||||||
|
System::System() = default;
|
||||||
|
|
||||||
System::~System() = default;
|
System::~System() = default;
|
||||||
|
|
||||||
/// Runs a CPU core while the system is powered on
|
/// Runs a CPU core while the system is powered on
|
||||||
|
|
|
@ -168,6 +168,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
System();
|
||||||
|
|
||||||
/// Returns the currently running CPU core
|
/// Returns the currently running CPU core
|
||||||
Cpu& CurrentCpuCore();
|
Cpu& CurrentCpuCore();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue