mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-25 19:55:50 +00:00
DiscIO: Use std::optional for GetTitleID instead of pointer
This makes the interface slightly cleaner and a bit more consistent with the other getters. Still not fully the same, since the others don't really handle failures with std::optional; but at least the value is returned by value now, as opposed to having the function take a pointer to a u64.
This commit is contained in:
parent
5d6074f157
commit
1a17c02d6f
9 changed files with 31 additions and 26 deletions
|
@ -161,7 +161,8 @@ bool GameFile::TryLoadVolume()
|
|||
|
||||
m_game_id = QString::fromStdString(volume->GetGameID());
|
||||
std::string maker_id = volume->GetMakerID();
|
||||
volume->GetTitleID(&m_title_id);
|
||||
if (std::optional<u64> title_id = volume->GetTitleID())
|
||||
m_title_id = *title_id;
|
||||
m_maker = QString::fromStdString(DiscIO::GetCompanyFromID(maker_id));
|
||||
m_maker_id = QString::fromStdString(maker_id);
|
||||
m_revision = volume->GetRevision();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue