diff options
| author | Matthew Parlane <parlane@gmail.com> | 2014-02-08 14:23:34 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2014-02-10 17:25:18 +1300 |
| commit | 32bfcc034f41276f0fad036dece8a8f632913dff (patch) | |
| tree | 33955e265cab4ece64efbbcc475896e8e8d280b6 /Source/Core/Common/NandPaths.cpp | |
| parent | 8d25e12085b8e3785a9843a8ffb5545eeb109107 (diff) | |
Some tidy up of sprintf to StringFromFormat
Includes a small fix to SetupWiiMemory
Diffstat (limited to 'Source/Core/Common/NandPaths.cpp')
| -rw-r--r-- | Source/Core/Common/NandPaths.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/Source/Core/Common/NandPaths.cpp b/Source/Core/Common/NandPaths.cpp index 3ca5550d40..52e3904536 100644 --- a/Source/Core/Common/NandPaths.cpp +++ b/Source/Core/Common/NandPaths.cpp @@ -12,20 +12,16 @@ namespace Common std::string GetTicketFileName(u64 _titleID) { - char TicketFilename[1024]; - sprintf(TicketFilename, "%sticket/%08x/%08x.tik", - File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(_titleID >> 32), (u32)_titleID); - - return TicketFilename; + return StringFromFormat("%sticket/%08x/%08x.tik", + File::GetUserPath(D_WIIUSER_IDX).c_str(), + (u32)(_titleID >> 32), (u32)_titleID); } std::string GetTitleDataPath(u64 _titleID) { - char path[1024]; - sprintf(path, "%stitle/%08x/%08x/data/", - File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(_titleID >> 32), (u32)_titleID); - - return path; + return StringFromFormat("%stitle/%08x/%08x/data/", + File::GetUserPath(D_WIIUSER_IDX).c_str(), + (u32)(_titleID >> 32), (u32)_titleID); } std::string GetTMDFileName(u64 _titleID) @@ -34,11 +30,9 @@ std::string GetTMDFileName(u64 _titleID) } std::string GetTitleContentPath(u64 _titleID) { - char ContentPath[1024]; - sprintf(ContentPath, "%stitle/%08x/%08x/content/", - File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(_titleID >> 32), (u32)_titleID); - - return ContentPath; + return StringFromFormat("%stitle/%08x/%08x/content/", + File::GetUserPath(D_WIIUSER_IDX).c_str(), + (u32)(_titleID >> 32), (u32)_titleID); } bool CheckTitleTMD(u64 _titleID) |
