summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-04-06 05:40:16 +0200
committerGitHub <noreply@github.com>2019-04-06 05:40:16 +0200
commit00207cc965f447a209c50e28cd24de545edc366e (patch)
tree7c8f4d0c081f309053ed6ae4b8f89f8c65d24d7b /src/core/file_sys
parentMerge pull request #2334 from lioncash/override (diff)
parentfile_sys/fsmitm_romfsbuild: Utilize a string_view in romfs_calc_path_hash() (diff)
downloadyuzu-00207cc965f447a209c50e28cd24de545edc366e.tar
yuzu-00207cc965f447a209c50e28cd24de545edc366e.tar.gz
yuzu-00207cc965f447a209c50e28cd24de545edc366e.tar.bz2
yuzu-00207cc965f447a209c50e28cd24de545edc366e.tar.lz
yuzu-00207cc965f447a209c50e28cd24de545edc366e.tar.xz
yuzu-00207cc965f447a209c50e28cd24de545edc366e.tar.zst
yuzu-00207cc965f447a209c50e28cd24de545edc366e.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/fsmitm_romfsbuild.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/file_sys/fsmitm_romfsbuild.cpp b/src/core/file_sys/fsmitm_romfsbuild.cpp
index 47b7526c7..d126ae8dd 100644
--- a/src/core/file_sys/fsmitm_romfsbuild.cpp
+++ b/src/core/file_sys/fsmitm_romfsbuild.cpp
@@ -23,6 +23,7 @@
*/
#include <cstring>
+#include <string_view>
#include "common/alignment.h"
#include "common/assert.h"
#include "core/file_sys/fsmitm_romfsbuild.h"
@@ -97,7 +98,8 @@ struct RomFSBuildFileContext {
VirtualFile source;
};
-static u32 romfs_calc_path_hash(u32 parent, std::string path, u32 start, std::size_t path_len) {
+static u32 romfs_calc_path_hash(u32 parent, std::string_view path, u32 start,
+ std::size_t path_len) {
u32 hash = parent ^ 123456789;
for (u32 i = 0; i < path_len; i++) {
hash = (hash >> 5) | (hash << 27);