mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinWX: Don't use IsElfOrDol outside of ISOFile
It's redundant because GetPlatform can do the same thing.
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
@ -193,7 +194,22 @@ void GameListItem::DoState(PointerWrap &p)
|
||||
p.Do(m_Revision);
|
||||
}
|
||||
|
||||
std::string GameListItem::CreateCacheFilename()
|
||||
bool GameListItem::IsElfOrDol() const
|
||||
{
|
||||
const std::string name = GetName();
|
||||
const size_t pos = name.rfind('.');
|
||||
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
std::string ext = name.substr(pos);
|
||||
std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower);
|
||||
|
||||
return ext == ".elf" || ext == ".dol";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string GameListItem::CreateCacheFilename() const
|
||||
{
|
||||
std::string Filename, LegalPathname, extension;
|
||||
SplitPath(m_FileName, &LegalPathname, &Filename, &extension);
|
||||
@ -294,19 +310,3 @@ const std::string GameListItem::GetWiiFSPath() const
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool GameListItem::IsElfOrDol() const
|
||||
{
|
||||
const std::string name = GetName();
|
||||
const size_t pos = name.rfind('.');
|
||||
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
std::string ext = name.substr(pos);
|
||||
std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower);
|
||||
|
||||
return ext == ".elf" ||
|
||||
ext == ".dol";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user