1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

AK: Remove unused rehash_for_collision

This commit is contained in:
Jelle Raaijmakers 2023-02-14 01:35:10 +01:00 committed by Andrew Kaster
parent c08d137fcd
commit 4cd3a84c4b
2 changed files with 0 additions and 21 deletions

View file

@ -19,20 +19,6 @@ constexpr unsigned int_hash(u32 key)
return key;
}
constexpr unsigned rehash_for_collision(u32 key)
{
unsigned const magic = 0xBA5EDB01;
if (key == magic)
return 0u;
if (key == 0u)
key = magic;
key ^= key << 13;
key ^= key >> 17;
key ^= key << 5;
return key;
}
constexpr unsigned pair_int_hash(u32 key1, u32 key2)
{
return int_hash((int_hash(key1) * 209) ^ (int_hash(key2 * 413)));