| 59 | } |
| 60 | |
| 61 | std::uint64_t SeedRng::hash_string(std::string_view s) noexcept { |
| 62 | // fnv-1a with a finalizer mix tacked on |
| 63 | std::uint64_t h = 0xCBF29CE484222325ULL; |
| 64 | for (unsigned char c : s) { |
| 65 | h ^= c; |
| 66 | h *= 0x100000001B3ULL; |
| 67 | } |
| 68 | h ^= h >> 33; |
| 69 | h *= 0xFF51AFD7ED558CCDULL; |
| 70 | h ^= h >> 33; |
| 71 | h *= 0xC4CEB9FE1A85EC53ULL; |
| 72 | h ^= h >> 33; |
| 73 | return h; |
| 74 | } |
| 75 | } |
nothing calls this directly
no outgoing calls
no test coverage detected