Merge pull request #4304 from B3n30/std_optional

Replace boost::optional with std::optional where possible
This commit is contained in:
Weiyi Wang 2018-10-11 12:40:00 -04:00 committed by GitHub
commit 9adc407112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 115 additions and 109 deletions

View file

@ -99,7 +99,7 @@ System::ResultStatus System::Load(EmuWindow& emu_window, const std::string& file
LOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath);
return ResultStatus::ErrorGetLoader;
}
std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode =
std::pair<std::optional<u32>, Loader::ResultStatus> system_mode =
app_loader->LoadKernelSystemMode();
if (system_mode.second != Loader::ResultStatus::Success) {
@ -116,7 +116,8 @@ System::ResultStatus System::Load(EmuWindow& emu_window, const std::string& file
}
}
ResultStatus init_result{Init(emu_window, system_mode.first.get())};
ASSERT(system_mode.first);
ResultStatus init_result{Init(emu_window, *system_mode.first)};
if (init_result != ResultStatus::Success) {
LOG_CRITICAL(Core, "Failed to initialize system (Error {})!",
static_cast<u32>(init_result));