mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Qt/Resources: Convert int parameters of GetCountry(), GetPlatform() and GetMisc() to enum classes
Makes the parameter strongly-typed and doesn't accept arbitrary int values.
This commit is contained in:
@ -95,19 +95,19 @@ void Resources::Init()
|
||||
m_misc.append(GetScaledPixmap("Dolphin"));
|
||||
}
|
||||
|
||||
QPixmap Resources::GetPlatform(int platform)
|
||||
QPixmap Resources::GetPlatform(DiscIO::Platform platform)
|
||||
{
|
||||
return m_platforms[platform];
|
||||
return m_platforms[static_cast<int>(platform)];
|
||||
}
|
||||
|
||||
QPixmap Resources::GetCountry(int country)
|
||||
QPixmap Resources::GetCountry(DiscIO::Country country)
|
||||
{
|
||||
return m_countries[country];
|
||||
return m_countries[static_cast<int>(country)];
|
||||
}
|
||||
|
||||
QPixmap Resources::GetMisc(int id)
|
||||
QPixmap Resources::GetMisc(MiscID id)
|
||||
{
|
||||
return m_misc[id];
|
||||
return m_misc[static_cast<int>(id)];
|
||||
}
|
||||
|
||||
QIcon Resources::GetAppIcon()
|
||||
|
Reference in New Issue
Block a user