diff options
| author | 2021-06-23 09:59:56 -0400 | |
|---|---|---|
| committer | 2021-06-23 13:48:21 -0400 | |
| commit | d0b1f2bd05a2fcadbb4c148be2105e337dd986e8 (patch) | |
| tree | 17e7abb608ab936ae6696e0507c9d1441256c66a /src/core/file_sys | |
| parent | externals: Update dynarmic to allow fmt compilation to succeed (diff) | |
| download | yuzu-d0b1f2bd05a2fcadbb4c148be2105e337dd986e8.tar.gz yuzu-d0b1f2bd05a2fcadbb4c148be2105e337dd986e8.tar.xz yuzu-d0b1f2bd05a2fcadbb4c148be2105e337dd986e8.zip | |
General: Resolve fmt specifiers to adhere to 8.0.0 API where applicable
Also removes some deprecated API usages.
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/registered_cache.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index 066c6789a..7a646b5f1 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp | |||
| @@ -58,14 +58,17 @@ static bool FollowsNcaIdFormat(std::string_view name) { | |||
| 58 | 58 | ||
| 59 | static std::string GetRelativePathFromNcaID(const std::array<u8, 16>& nca_id, bool second_hex_upper, | 59 | static std::string GetRelativePathFromNcaID(const std::array<u8, 16>& nca_id, bool second_hex_upper, |
| 60 | bool within_two_digit, bool cnmt_suffix) { | 60 | bool within_two_digit, bool cnmt_suffix) { |
| 61 | if (!within_two_digit) | 61 | if (!within_two_digit) { |
| 62 | return fmt::format(cnmt_suffix ? "{}.cnmt.nca" : "/{}.nca", | 62 | const auto format_str = fmt::runtime(cnmt_suffix ? "{}.cnmt.nca" : "/{}.nca"); |
| 63 | Common::HexToString(nca_id, second_hex_upper)); | 63 | return fmt::format(format_str, Common::HexToString(nca_id, second_hex_upper)); |
| 64 | } | ||
| 64 | 65 | ||
| 65 | Core::Crypto::SHA256Hash hash{}; | 66 | Core::Crypto::SHA256Hash hash{}; |
| 66 | mbedtls_sha256_ret(nca_id.data(), nca_id.size(), hash.data(), 0); | 67 | mbedtls_sha256_ret(nca_id.data(), nca_id.size(), hash.data(), 0); |
| 67 | return fmt::format(cnmt_suffix ? "/000000{:02X}/{}.cnmt.nca" : "/000000{:02X}/{}.nca", hash[0], | 68 | |
| 68 | Common::HexToString(nca_id, second_hex_upper)); | 69 | const auto format_str = |
| 70 | fmt::runtime(cnmt_suffix ? "/000000{:02X}/{}.cnmt.nca" : "/000000{:02X}/{}.nca"); | ||
| 71 | return fmt::format(format_str, hash[0], Common::HexToString(nca_id, second_hex_upper)); | ||
| 69 | } | 72 | } |
| 70 | 73 | ||
| 71 | static std::string GetCNMTName(TitleType type, u64 title_id) { | 74 | static std::string GetCNMTName(TitleType type, u64 title_id) { |