Skip to content
Snippets Groups Projects
Commit b2f33784 authored by patavirt's avatar patavirt
Browse files

fixup

parent 88d8612f
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,13 @@ public:
{
size_t h1 = std::hash<size_t>{}(p.first);
size_t h2 = std::hash<size_t>{}(p.second);
h1 ^= h2 + 0x9e3779b9 + (h1 << 6) + (h1 >> 2);
size_t golden_ratio;
if constexpr (sizeof(size_t) < 8) {
golden_ratio = 0x9e3779b9;
} else {
golden_ratio = 0x9e3779b97f4a7c15;
}
h1 ^= h2 + golden_ratio + (h1 << 6) + (h1 >> 2);
return h1;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment