From d100c1dc37596bce348d93e376b00d4a56458613 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 14 Oct 2020 18:34:45 +0200 Subject: 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. --- Source/Core/DiscIO/DiscExtractor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/DiscIO/DiscExtractor.cpp') 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 #include +#include + #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); } } -- cgit v1.2.3