summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/literal.h4
-rw-r--r--src/support/hash.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/literal.h b/src/literal.h
index c55d645ad..55efbd31e 100644
--- a/src/literal.h
+++ b/src/literal.h
@@ -158,8 +158,8 @@ namespace std {
template<> struct hash<wasm::Literal> {
size_t operator()(const wasm::Literal& a) const {
return wasm::rehash(
- hash<size_t>()(size_t(a.type)),
- hash<int64_t>()(a.getBits())
+ uint64_t(hash<size_t>()(size_t(a.type))),
+ uint64_t(hash<int64_t>()(a.getBits()))
);
}
};
diff --git a/src/support/hash.h b/src/support/hash.h
index 5ee3b8a3d..9edbdd2c7 100644
--- a/src/support/hash.h
+++ b/src/support/hash.h
@@ -35,7 +35,7 @@ inline uint32_t rehash(uint32_t x, uint32_t y) { // see http://www.cse.yorku.ca/
return hash;
}
-inline size_t rehash(uint64_t x, uint64_t y) { // see boost and https://stackoverflow.com/a/2595226/1176841
+inline uint64_t rehash(uint64_t x, uint64_t y) { // see boost and https://stackoverflow.com/a/2595226/1176841
return x ^ (y + 0x9e3779b9 + (x << 6) + (x >> 2));
}