diff options
| author | 2019-11-13 10:02:08 -0500 | |
|---|---|---|
| committer | 2019-11-13 10:02:10 -0500 | |
| commit | 03b73aa5751cab55de1f470cb9fefba6b820ace3 (patch) | |
| tree | dfe70f93db8a3809ff056059740b4d970515407a /src | |
| parent | Merge pull request #3085 from bunnei/web-token-b64 (diff) | |
| download | yuzu-03b73aa5751cab55de1f470cb9fefba6b820ace3.tar.gz yuzu-03b73aa5751cab55de1f470cb9fefba6b820ace3.tar.xz yuzu-03b73aa5751cab55de1f470cb9fefba6b820ace3.zip | |
xts_archive: Remove redundant std::string constructor
We can just call the .data() member of path instead of constructing a
completely new string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/xts_archive.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/file_sys/xts_archive.cpp b/src/core/file_sys/xts_archive.cpp index 4bc5cb2ee..f5f8b91c9 100644 --- a/src/core/file_sys/xts_archive.cpp +++ b/src/core/file_sys/xts_archive.cpp | |||
| @@ -93,8 +93,7 @@ Loader::ResultStatus NAX::Parse(std::string_view path) { | |||
| 93 | std::size_t i = 0; | 93 | std::size_t i = 0; |
| 94 | for (; i < sd_keys.size(); ++i) { | 94 | for (; i < sd_keys.size(); ++i) { |
| 95 | std::array<Core::Crypto::Key128, 2> nax_keys{}; | 95 | std::array<Core::Crypto::Key128, 2> nax_keys{}; |
| 96 | if (!CalculateHMAC256(nax_keys.data(), sd_keys[i].data(), 0x10, std::string(path).c_str(), | 96 | if (!CalculateHMAC256(nax_keys.data(), sd_keys[i].data(), 0x10, path.data(), path.size())) { |
| 97 | path.size())) { | ||
| 98 | return Loader::ResultStatus::ErrorNAXKeyHMACFailed; | 97 | return Loader::ResultStatus::ErrorNAXKeyHMACFailed; |
| 99 | } | 98 | } |
| 100 | 99 | ||