summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/DiscExtractor.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2020-10-14 18:34:45 +0200
committerJosJuice <josjuice@gmail.com>2020-10-19 14:30:47 +0200
commitd100c1dc37596bce348d93e376b00d4a56458613 (patch)
treeb5347056c1dc3b5763cb63e74082d79ce212c067 /Source/Core/DiscIO/DiscExtractor.cpp
parentc9b2fbb64b94c6b79958f5d69af8e7c891794a39 (diff)
DiscIO: Make use of fmt where applicable
Once nice benefit of fmt is that we can use positional arguments in localizable strings. This a feature which has been requested for the Korean translation of strings like "Errors were found in %zu blocks in the %s partition." and which will no doubt be useful for other languages too.
Diffstat (limited to 'Source/Core/DiscIO/DiscExtractor.cpp')
-rw-r--r--Source/Core/DiscIO/DiscExtractor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/DiscIO/DiscExtractor.cpp b/Source/Core/DiscIO/DiscExtractor.cpp
index b12b56b5c2..c9b01759a1 100644
--- a/Source/Core/DiscIO/DiscExtractor.cpp
+++ b/Source/Core/DiscIO/DiscExtractor.cpp
@@ -9,10 +9,11 @@
#include <locale>
#include <optional>
+#include <fmt/format.h>
+
#include "Common/CommonTypes.h"
#include "Common/File.h"
#include "Common/FileUtil.h"
-#include "Common/StringUtil.h"
#include "DiscIO/Enums.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/Volume.h"
@@ -45,7 +46,7 @@ std::string NameForPartitionType(u32 partition_type, bool include_prefix)
return include_prefix ? "P-" + type_as_game_id : type_as_game_id;
}
- return StringFromFormat(include_prefix ? "P%u" : "%u", partition_type);
+ return fmt::format(include_prefix ? "P{}" : "{}", partition_type);
}
}