summaryrefslogtreecommitdiff
path: root/Source/Core/Common/MD5.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-14 10:53:46 -0400
committerLioncash <mathew1800@gmail.com>2019-06-14 15:04:09 -0400
commit5b92d5076a0be89945fa0fc722749dd5fbfcdf4c (patch)
treeb87080969dd47a01c3a7845d65ef2afdef90928d /Source/Core/Common/MD5.cpp
parent925afcae3b7b6ea8dde2cfd236288d924c42fa05 (diff)
Common: Use fmt where applicable
Begins the transition to using fmt for string formatting where applicable. Given fmt supports formatting std::string instances out of the box, we can remove now-unnecessary calls to .c_str() and .data(). Note that this change does not touch the actual logging subsystem aside from converting the final StringFromFormat call in the process over to fmt::format. Given our logging system is heavily used throughout the entire codebase, and converting that over will be quite a large change by itself, this will be tackled near the end of the conversion process.
Diffstat (limited to 'Source/Core/Common/MD5.cpp')
-rw-r--r--Source/Core/Common/MD5.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/Common/MD5.cpp b/Source/Core/Common/MD5.cpp
index 1020b51e57..5c2265e2a2 100644
--- a/Source/Core/Common/MD5.cpp
+++ b/Source/Core/Common/MD5.cpp
@@ -2,12 +2,15 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/MD5.h"
+
#include <fstream>
#include <functional>
#include <mbedtls/md5.h>
#include <string>
-#include "Common/MD5.h"
+#include <fmt/format.h>
+
#include "Common/StringUtil.h"
#include "DiscIO/Blob.h"
@@ -45,7 +48,7 @@ std::string MD5Sum(const std::string& file_path, std::function<bool(int)> report
// Convert to hex
for (u8 n : output)
- output_string += StringFromFormat("%02x", n);
+ output_string += fmt::format("{:02x}", n);
return output_string;
}