mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00: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:
parent
b9960777a7
commit
a0642b3b00
4 changed files with 26 additions and 20 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue