diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-09-11 12:28:57 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-09-11 12:28:57 -0400 |
| commit | d7acf065059ae84eda86e3feb27e0d5c2283be0b (patch) | |
| tree | 16e2965d872810554200c3a629d91b7e6f28de7f /Source/Core/DolphinWX/ISOFile.cpp | |
| parent | c07d672b31f119e17dabe68856e66ec62e87583c (diff) | |
| parent | 4716c8ecf65c87cf4fd2e71dfcb00a4e15ff80fd (diff) | |
Merge pull request #2985 from JosJuice/iselfordol
DolphinWX: Don't use IsElfOrDol outside of ISOFile
Diffstat (limited to 'Source/Core/DolphinWX/ISOFile.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/ISOFile.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index 5aeca6d1c1..026dda93d8 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include <algorithm> #include <cinttypes> #include <cstdio> #include <cstring> @@ -197,7 +198,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); @@ -325,19 +341,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; -} |
