2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

xts_archive: Remove redundant std::string constructor

We can just call the .data() member of path instead of constructing a
completely new string.
This commit is contained in:
Lioncash 2019-11-13 10:02:08 -05:00
parent 8714d40a77
commit 03b73aa575

View file

@ -93,8 +93,7 @@ Loader::ResultStatus NAX::Parse(std::string_view path) {
std::size_t i = 0; std::size_t i = 0;
for (; i < sd_keys.size(); ++i) { for (; i < sd_keys.size(); ++i) {
std::array<Core::Crypto::Key128, 2> nax_keys{}; std::array<Core::Crypto::Key128, 2> nax_keys{};
if (!CalculateHMAC256(nax_keys.data(), sd_keys[i].data(), 0x10, std::string(path).c_str(), if (!CalculateHMAC256(nax_keys.data(), sd_keys[i].data(), 0x10, path.data(), path.size())) {
path.size())) {
return Loader::ResultStatus::ErrorNAXKeyHMACFailed; return Loader::ResultStatus::ErrorNAXKeyHMACFailed;
} }