summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/ISOFile.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-03-12 15:33:41 -0400
committerLioncash <mathew1800@gmail.com>2014-03-14 13:51:23 -0400
commita82675b7d581421fa80d5d5c53253cf1d5c1a26d (patch)
tree8f1efce1e00c6a7d6044ca3b543d9211a65e8c11 /Source/Core/DolphinWX/ISOFile.cpp
parentdccc6d8b47b1f6fdab5374003492560c20f766b6 (diff)
Kill off some usages of c_str.
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
Diffstat (limited to 'Source/Core/DolphinWX/ISOFile.cpp')
-rw-r--r--Source/Core/DolphinWX/ISOFile.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp
index 81a2f49593..63c30f10bb 100644
--- a/Source/Core/DolphinWX/ISOFile.cpp
+++ b/Source/Core/DolphinWX/ISOFile.cpp
@@ -73,7 +73,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
m_VolumeSize = pVolume->GetSize();
m_UniqueID = pVolume->GetUniqueID();
- m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str());
+ m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName);
m_IsDiscTwo = pVolume->IsDiscTwo();
m_Revision = pVolume->GetRevision();
@@ -278,32 +278,31 @@ std::string GameListItem::GetName(int _index) const
const std::string GameListItem::GetWiiFSPath() const
{
- DiscIO::IVolume *Iso = DiscIO::CreateVolumeFromFilename(m_FileName);
+ DiscIO::IVolume *iso = DiscIO::CreateVolumeFromFilename(m_FileName);
std::string ret;
- if (Iso == nullptr)
+ if (iso == nullptr)
return ret;
- if (DiscIO::IsVolumeWiiDisc(Iso) || DiscIO::IsVolumeWadFile(Iso))
+ if (DiscIO::IsVolumeWiiDisc(iso) || DiscIO::IsVolumeWadFile(iso))
{
- char Path[250];
- u64 Title;
+ u64 title;
- Iso->GetTitleID((u8*)&Title);
- Title = Common::swap64(Title);
+ iso->GetTitleID((u8*)&title);
+ title = Common::swap64(title);
- sprintf(Path, "%stitle/%08x/%08x/data/",
- File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(Title>>32), (u32)Title);
+ const std::string path = StringFromFormat("%stitle/%08x/%08x/data/",
+ File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(title>>32), (u32)title);
- if (!File::Exists(Path))
- File::CreateFullPath(Path);
+ if (!File::Exists(path))
+ File::CreateFullPath(path);
- if (Path[0] == '.')
- ret = WxStrToStr(wxGetCwd()) + std::string(Path).substr(strlen(ROOT_DIR));
+ if (path[0] == '.')
+ ret = WxStrToStr(wxGetCwd()) + path.substr(strlen(ROOT_DIR));
else
- ret = std::string(Path);
+ ret = path;
}
- delete Iso;
+ delete iso;
return ret;
}