diff options
| author | JosJuice <josjuice@gmail.com> | 2017-06-04 10:33:14 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-06-05 13:26:51 +0200 |
| commit | c3fa0d6edf0ed65acdf789debed57cd4aa7955ba (patch) | |
| tree | f8f42f79831b513161902d819a945d60368f7499 /Source/Core/DolphinWX/ISOFile.cpp | |
| parent | e23cfc29654ece853309454a7a37306cc696af19 (diff) | |
DiscIO: Use std::optional in Volume and Blob
Diffstat (limited to 'Source/Core/DolphinWX/ISOFile.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/ISOFile.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index 75956e1845..28bdb261f7 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -108,10 +108,9 @@ GameListItem::GameListItem(const std::string& _rFileName, const Core::TitleDatab m_VolumeSize = volume->GetSize(); m_game_id = volume->GetGameID(); - if (std::optional<u64> title_id = volume->GetTitleID()) - m_title_id = *title_id; - m_disc_number = volume->GetDiscNumber(); - m_Revision = volume->GetRevision(); + m_title_id = volume->GetTitleID().value_or(0); + m_disc_number = volume->GetDiscNumber().value_or(0); + m_Revision = volume->GetRevision().value_or(0); std::vector<u32> buffer = volume->GetBanner(&m_ImageWidth, &m_ImageHeight); ReadVolumeBanner(buffer, m_ImageWidth, m_ImageHeight); |
