diff options
author | bunnei <bunneidev@gmail.com> | 2019-04-06 05:40:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-06 05:40:16 +0200 |
commit | 00207cc965f447a209c50e28cd24de545edc366e (patch) | |
tree | 7c8f4d0c081f309053ed6ae4b8f89f8c65d24d7b /src/core | |
parent | Merge pull request #2334 from lioncash/override (diff) | |
parent | file_sys/fsmitm_romfsbuild: Utilize a string_view in romfs_calc_path_hash() (diff) | |
download | yuzu-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')
-rw-r--r-- | src/core/file_sys/fsmitm_romfsbuild.cpp | 4 |
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); |