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
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));