diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-11-11 01:06:33 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-11-11 01:09:42 -0500 |
| commit | 689eec5304ebfcd27013717bb7c3924da570db80 (patch) | |
| tree | 38671c968f92b99cc1f0b7d18c46717e5d6dbdcb /Source/Core/DiscIO/FileBlob.cpp | |
| parent | ae83685b0b4fd2d446738881c06e208e9a07166c (diff) | |
DiscIO: Make use of fmt-capable panic alerts
Migrates the DiscIO code over to fmt.
Diffstat (limited to 'Source/Core/DiscIO/FileBlob.cpp')
| -rw-r--r-- | Source/Core/DiscIO/FileBlob.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/Core/DiscIO/FileBlob.cpp b/Source/Core/DiscIO/FileBlob.cpp index 980b158dc9..13439d029b 100644 --- a/Source/Core/DiscIO/FileBlob.cpp +++ b/Source/Core/DiscIO/FileBlob.cpp @@ -49,10 +49,11 @@ bool ConvertToPlain(BlobReader* infile, const std::string& infile_path, File::IOFile outfile(outfile_path, "wb"); if (!outfile) { - PanicAlertT("Failed to open the output file \"%s\".\n" - "Check that you have permissions to write the target folder and that the media can " - "be written.", - outfile_path.c_str()); + PanicAlertFmtT( + "Failed to open the output file \"{}\".\n" + "Check that you have permissions to write the target folder and that the media can " + "be written.", + outfile_path); return false; } @@ -89,15 +90,15 @@ bool ConvertToPlain(BlobReader* infile, const std::string& infile_path, const u64 sz = std::min(buffer_size, infile->GetDataSize() - inpos); if (!infile->Read(inpos, sz, buffer.data())) { - PanicAlertT("Failed to read from the input file \"%s\".", infile_path.c_str()); + PanicAlertFmtT("Failed to read from the input file \"{}\".", infile_path); success = false; break; } if (!outfile.WriteBytes(buffer.data(), sz)) { - PanicAlertT("Failed to write the output file \"%s\".\n" - "Check that you have enough space available on the target drive.", - outfile_path.c_str()); + PanicAlertFmtT("Failed to write the output file \"{}\".\n" + "Check that you have enough space available on the target drive.", + outfile_path); success = false; break; } |
