summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-18 18:10:06 -0400
committerGravatar Lioncash2018-07-18 18:18:27 -0400
commit3a4841e40302d50b21064be7bc248b249ac88467 (patch)
treea63c0f3686216645ffd3fc40f069b68c42f4423f /src/core/core.cpp
parentMerge pull request #681 from lioncash/const (diff)
downloadyuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar.gz
yuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar.xz
yuzu-3a4841e40302d50b21064be7bc248b249ac88467.zip
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.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 8335d502e..7936c5b56 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -29,7 +29,7 @@ System::~System() = default;
29 29
30/// Runs a CPU core while the system is powered on 30/// Runs a CPU core while the system is powered on
31static void RunCpuCore(std::shared_ptr<Cpu> cpu_state) { 31static void RunCpuCore(std::shared_ptr<Cpu> cpu_state) {
32 while (Core::System().GetInstance().IsPoweredOn()) { 32 while (Core::System::GetInstance().IsPoweredOn()) {
33 cpu_state->RunLoop(true); 33 cpu_state->RunLoop(true);
34 } 34 }
35} 35}