summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/file_util.cpp4
-rw-r--r--src/common/hash.cpp16
2 files changed, 2 insertions, 18 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 836b58d52..dcb9baa08 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -861,8 +861,8 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam
861 const std::string forbidden_characters = ".\"/\\[]:;=, "; 861 const std::string forbidden_characters = ".\"/\\[]:;=, ";
862 862
863 // On a FAT32 partition, 8.3 names are stored as a 11 bytes array, filled with spaces. 863 // On a FAT32 partition, 8.3 names are stored as a 11 bytes array, filled with spaces.
864 short_name = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\0'}; 864 short_name = {{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\0'}};
865 extension = {' ', ' ', ' ', '\0'}; 865 extension = {{' ', ' ', ' ', '\0'}};
866 866
867 std::string::size_type point = filename.rfind('.'); 867 std::string::size_type point = filename.rfind('.');
868 if (point == filename.size() - 1) 868 if (point == filename.size() - 1)
diff --git a/src/common/hash.cpp b/src/common/hash.cpp
index 413e9c6f1..c49c2f60e 100644
--- a/src/common/hash.cpp
+++ b/src/common/hash.cpp
@@ -17,27 +17,11 @@ namespace Common {
17 17
18// Block read - if your platform needs to do endian-swapping or can only handle aligned reads, do 18// Block read - if your platform needs to do endian-swapping or can only handle aligned reads, do
19// the conversion here 19// the conversion here
20
21static FORCE_INLINE u32 getblock32(const u32* p, int i) {
22 return p[i];
23}
24
25static FORCE_INLINE u64 getblock64(const u64* p, int i) { 20static FORCE_INLINE u64 getblock64(const u64* p, int i) {
26 return p[i]; 21 return p[i];
27} 22}
28 23
29// Finalization mix - force all bits of a hash block to avalanche 24// Finalization mix - force all bits of a hash block to avalanche
30
31static FORCE_INLINE u32 fmix32(u32 h) {
32 h ^= h >> 16;
33 h *= 0x85ebca6b;
34 h ^= h >> 13;
35 h *= 0xc2b2ae35;
36 h ^= h >> 16;
37
38 return h;
39}
40
41static FORCE_INLINE u64 fmix64(u64 k) { 25static FORCE_INLINE u64 fmix64(u64 k) {
42 k ^= k >> 33; 26 k ^= k >> 33;
43 k *= 0xff51afd7ed558ccdllu; 27 k *= 0xff51afd7ed558ccdllu;