diff options
| author | 2018-08-24 02:48:28 -0400 | |
|---|---|---|
| committer | 2018-08-24 02:48:30 -0400 | |
| commit | 8492ec166970ed148f6577dfa3e672f0357095db (patch) | |
| tree | 36b93f208953f281ea47d10b22a9920b4fa4dcbc /src/core/core.cpp | |
| parent | Port #4013 from Citra: "Init logging sooner so we dont miss some logs on star... (diff) | |
| download | yuzu-8492ec166970ed148f6577dfa3e672f0357095db.tar.gz yuzu-8492ec166970ed148f6577dfa3e672f0357095db.tar.xz yuzu-8492ec166970ed148f6577dfa3e672f0357095db.zip | |
core: Remove always true conditionals in Load()
These conditions are always true, since the outer conditional already
checks for these conditions.
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 28038ff6f..07da4c493 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -135,8 +135,7 @@ System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::st | |||
| 135 | LOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", | 135 | LOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", |
| 136 | static_cast<int>(system_mode.second)); | 136 | static_cast<int>(system_mode.second)); |
| 137 | 137 | ||
| 138 | if (system_mode.second != Loader::ResultStatus::Success) | 138 | return ResultStatus::ErrorSystemMode; |
| 139 | return ResultStatus::ErrorSystemMode; | ||
| 140 | } | 139 | } |
| 141 | 140 | ||
| 142 | ResultStatus init_result{Init(emu_window)}; | 141 | ResultStatus init_result{Init(emu_window)}; |
| @@ -148,14 +147,12 @@ System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::st | |||
| 148 | } | 147 | } |
| 149 | 148 | ||
| 150 | const Loader::ResultStatus load_result{app_loader->Load(current_process)}; | 149 | const Loader::ResultStatus load_result{app_loader->Load(current_process)}; |
| 151 | if (Loader::ResultStatus::Success != load_result) { | 150 | if (load_result != Loader::ResultStatus::Success) { |
| 152 | LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result)); | 151 | LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result)); |
| 153 | System::Shutdown(); | 152 | System::Shutdown(); |
| 154 | 153 | ||
| 155 | if (load_result != Loader::ResultStatus::Success) { | 154 | return static_cast<ResultStatus>(static_cast<u32>(ResultStatus::ErrorLoader) + |
| 156 | return static_cast<ResultStatus>(static_cast<u32>(ResultStatus::ErrorLoader) + | 155 | static_cast<u32>(load_result)); |
| 157 | static_cast<u32>(load_result)); | ||
| 158 | } | ||
| 159 | } | 156 | } |
| 160 | status = ResultStatus::Success; | 157 | status = ResultStatus::Success; |
| 161 | return status; | 158 | return status; |