authorgravatar for me@breakin.sebreakin <me@breakin.se> 2020-11-18 00:05:09+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-18 18:06:04-07:00
loge814f7105214c588f5df4c173ecf84dd3a11b01d
treee5570deaf6feac95b13fdca8f6fd7c53c2b0224b
parent50269f23155f65d702e3932f5a8bb08142e023ac

Change seed for Murmur2_64 from u32 to u64


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/hash/murmur.zig+2-2
......@@ -135,7 +135,7 @@ pub const Murmur2_64 = struct {
135135 return @call(.{ .modifier = .always_inline }, Self.hashUint32WithSeed, .{ v, default_seed });
136136 }
137137
138 pub fn hashUint32WithSeed(v: u32, seed: u32) u64 {
138 pub fn hashUint32WithSeed(v: u32, seed: u64) u64 {
139139 const m: u64 = 0xc6a4a7935bd1e995;
140140 const len: u64 = 4;
141141 var h1: u64 = seed ^ (len *% m);
......@@ -152,7 +152,7 @@ pub const Murmur2_64 = struct {
152152 return @call(.{ .modifier = .always_inline }, Self.hashUint64WithSeed, .{ v, default_seed });
153153 }
154154
155 pub fn hashUint64WithSeed(v: u64, seed: u32) u64 {
155 pub fn hashUint64WithSeed(v: u64, seed: u64) u64 {
156156 const m: u64 = 0xc6a4a7935bd1e995;
157157 const len: u64 = 8;
158158 var h1: u64 = seed ^ (len *% m);