From 03b73aa5751cab55de1f470cb9fefba6b820ace3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 13 Nov 2019 10:02:08 -0500 Subject: [PATCH] xts_archive: Remove redundant std::string constructor We can just call the .data() member of path instead of constructing a completely new string. --- src/core/file_sys/xts_archive.cpp | 3 +-- 1 file changed, 1 insertion(+), 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) { std::size_t i = 0; for (; i < sd_keys.size(); ++i) { std::array nax_keys{}; - if (!CalculateHMAC256(nax_keys.data(), sd_keys[i].data(), 0x10, std::string(path).c_str(), - path.size())) { + if (!CalculateHMAC256(nax_keys.data(), sd_keys[i].data(), 0x10, path.data(), path.size())) { return Loader::ResultStatus::ErrorNAXKeyHMACFailed; }