mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -108,7 +108,8 @@ GameListItem::GameListItem(const std::string& _rFileName, const Core::TitleDatab
|
||||
m_VolumeSize = volume->GetSize();
|
||||
|
||||
m_game_id = volume->GetGameID();
|
||||
volume->GetTitleID(&m_title_id);
|
||||
if (std::optional<u64> title_id = volume->GetTitleID())
|
||||
m_title_id = *title_id;
|
||||
m_disc_number = volume->GetDiscNumber();
|
||||
m_Revision = volume->GetRevision();
|
||||
|
||||
|
Reference in New Issue
Block a user