diff options
| author | LC <mathew1800@gmail.com> | 2020-10-19 09:18:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-19 09:18:16 -0400 |
| commit | 0f5bf90013cd1358b3ccb2f22c09748e40a552f4 (patch) | |
| tree | f4fedfa6c797161388822c4b2d62235a9da4781b /Source/Core/DiscIO/NANDImporter.cpp | |
| parent | c9b2fbb64b94c6b79958f5d69af8e7c891794a39 (diff) | |
| parent | cb14b65aad860a79f949fa1e6986cffeba5e3509 (diff) | |
Merge pull request #9150 from JosJuice/discio-fmt
DiscIO: Make use of fmt where applicable
Diffstat (limited to 'Source/Core/DiscIO/NANDImporter.cpp')
| -rw-r--r-- | Source/Core/DiscIO/NANDImporter.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/DiscIO/NANDImporter.cpp b/Source/Core/DiscIO/NANDImporter.cpp index 9c161bcc02..beb84e8357 100644 --- a/Source/Core/DiscIO/NANDImporter.cpp +++ b/Source/Core/DiscIO/NANDImporter.cpp @@ -9,12 +9,13 @@ #include <cinttypes> #include <cstring> +#include <fmt/format.h> + #include "Common/Crypto/AES.h" #include "Common/File.h" #include "Common/FileUtil.h" #include "Common/Logging/Log.h" #include "Common/MsgHandler.h" -#include "Common/StringUtil.h" #include "Common/Swap.h" #include "Core/IOS/ES/Formats.h" @@ -132,9 +133,10 @@ std::string NANDImporter::GetPath(const NANDFSTEntry& entry, const std::string& std::string NANDImporter::FormatDebugString(const NANDFSTEntry& entry) { - return StringFromFormat("%12.12s 0x%02x 0x%02x 0x%04x 0x%04x 0x%08x 0x%04x 0x%04x 0x%04x 0x%08x", - entry.name, entry.mode, entry.attr, entry.sub, entry.sib, entry.size, - entry.x1, entry.uid, entry.gid, entry.x3); + return fmt::format( + "{:12.12} {:#04x} {:#04x} {:#06x} {:#06x} {:#010x} {:#06x} {:#06x} {:#06x} {:#010x}", + entry.name, entry.mode, entry.attr, entry.sub, entry.sib, entry.size, entry.x1, entry.uid, + entry.gid, entry.x3); } void NANDImporter::ProcessEntry(u16 entry_number, const std::string& parent_path) @@ -216,7 +218,7 @@ bool NANDImporter::ExtractCertificates(const std::string& nand_root) return false; } - File::IOFile content_file(content_dir + StringFromFormat("%08x.app", content_metadata.id), "rb"); + File::IOFile content_file(content_dir + fmt::format("{:08x}.app", content_metadata.id), "rb"); std::vector<u8> content_bytes(content_file.GetSize()); if (!content_file.ReadBytes(content_bytes.data(), content_bytes.size())) { |
