diff options
| author | bunnei <bunneidev@gmail.com> | 2019-11-15 12:08:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-15 12:08:50 -0500 |
| commit | 3e0e4f146b3f2ad7f1935a61141c38cdce87e04f (patch) | |
| tree | 75f29ce4bb9d84f9d9722b7aa86d71e805cac8cc /src/core/file_sys/xts_archive.cpp | |
| parent | bb31df62bb3430ed254a81859c44ff864b614e8e (diff) | |
| parent | 47a6bb2d5ba9c8488ef1588c99fbebd8d9417374 (diff) | |
Merge pull request #3091 from lioncash/core-conversion
core: Make most implicit type conversion warnings errors on MSVC
Diffstat (limited to 'src/core/file_sys/xts_archive.cpp')
| -rw-r--r-- | src/core/file_sys/xts_archive.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/file_sys/xts_archive.cpp b/src/core/file_sys/xts_archive.cpp index 7ca375791..86e06ccb9 100644 --- a/src/core/file_sys/xts_archive.cpp +++ b/src/core/file_sys/xts_archive.cpp @@ -7,12 +7,13 @@ #include <cstring> #include <regex> #include <string> + #include <mbedtls/md.h> #include <mbedtls/sha256.h> -#include "common/assert.h" + #include "common/file_util.h" #include "common/hex_util.h" -#include "common/logging/log.h" +#include "common/string_util.h" #include "core/crypto/aes_util.h" #include "core/crypto/xts_encryption_layer.h" #include "core/file_sys/partition_filesystem.h" @@ -53,11 +54,8 @@ NAX::NAX(VirtualFile file_) : header(std::make_unique<NAXHeader>()), file(std::m return; } - std::string two_dir = match[1]; - std::string nca_id = match[2]; - std::transform(two_dir.begin(), two_dir.end(), two_dir.begin(), ::toupper); - std::transform(nca_id.begin(), nca_id.end(), nca_id.begin(), ::tolower); - + const std::string two_dir = Common::ToUpper(match[1]); + const std::string nca_id = Common::ToLower(match[2]); status = Parse(fmt::format("/registered/{}/{}.nca", two_dir, nca_id)); } |
