summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/GameList/GameFile.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-06-05 14:23:11 +0200
committerGitHub <noreply@github.com>2017-06-05 14:23:11 +0200
commit75d686e2c79e2835be67e18d4bb8528f3bce2846 (patch)
treef8f42f79831b513161902d819a945d60368f7499 /Source/Core/DolphinQt2/GameList/GameFile.cpp
parente23cfc29654ece853309454a7a37306cc696af19 (diff)
parentc3fa0d6edf0ed65acdf789debed57cd4aa7955ba (diff)
Merge pull request #5530 from JosJuice/discio-optional
DiscIO: Use std::optional in Volume and Blob
Diffstat (limited to 'Source/Core/DolphinQt2/GameList/GameFile.cpp')
-rw-r--r--Source/Core/DolphinQt2/GameList/GameFile.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt2/GameList/GameFile.cpp b/Source/Core/DolphinQt2/GameList/GameFile.cpp
index 932281a74f..94ed8e6e47 100644
--- a/Source/Core/DolphinQt2/GameList/GameFile.cpp
+++ b/Source/Core/DolphinQt2/GameList/GameFile.cpp
@@ -161,18 +161,17 @@ bool GameFile::TryLoadVolume()
m_game_id = QString::fromStdString(volume->GetGameID());
std::string maker_id = volume->GetMakerID();
- if (std::optional<u64> title_id = volume->GetTitleID())
- m_title_id = *title_id;
+ m_title_id = volume->GetTitleID().value_or(0);
m_maker = QString::fromStdString(DiscIO::GetCompanyFromID(maker_id));
m_maker_id = QString::fromStdString(maker_id);
- m_revision = volume->GetRevision();
+ m_revision = volume->GetRevision().value_or(0);
m_internal_name = QString::fromStdString(volume->GetInternalName());
m_short_names = ConvertLanguageMap(volume->GetShortNames());
m_long_names = ConvertLanguageMap(volume->GetLongNames());
m_short_makers = ConvertLanguageMap(volume->GetShortMakers());
m_long_makers = ConvertLanguageMap(volume->GetLongMakers());
m_descriptions = ConvertLanguageMap(volume->GetDescriptions());
- m_disc_number = volume->GetDiscNumber();
+ m_disc_number = volume->GetDiscNumber().value_or(0);
m_platform = volume->GetVolumeType();
m_region = volume->GetRegion();
m_country = volume->GetCountry();