core: Don't construct instance of Core::System, just to access its live instance

This would result in a lot of allocations and related object
construction, just to toss it all away immediately after the call.

These are definitely not intentional, and it was intended that all of
these should have been accessing the static function GetInstance()
through the name itself, not constructed instances.
This commit is contained in:
Lioncash 2018-07-18 18:10:06 -04:00
parent 3d1e8f750c
commit 3a4841e403
5 changed files with 22 additions and 22 deletions

View file

@ -29,7 +29,7 @@ System::~System() = default;
/// Runs a CPU core while the system is powered on
static void RunCpuCore(std::shared_ptr<Cpu> cpu_state) {
while (Core::System().GetInstance().IsPoweredOn()) {
while (Core::System::GetInstance().IsPoweredOn()) {
cpu_state->RunLoop(true);
}
}