| 43 | bool operator!=(const HashedString &other) const; |
| 44 | |
| 45 | static HashType64 computeHash(const std::string &str) |
| 46 | { |
| 47 | constexpr HashType64 offset_basis = 0xCBF29CE484222325; |
| 48 | constexpr HashType64 prime = 0x100000001B3; |
| 49 | |
| 50 | if (str.empty()) { |
| 51 | return 0; |
| 52 | } |
| 53 | |
| 54 | HashType64 hash = offset_basis; |
| 55 | for (char c : str) { |
| 56 | hash *= prime; |
| 57 | hash ^= static_cast<unsigned char>(c); |
| 58 | } |
| 59 | return hash; |
| 60 | } |
| 61 | |
| 62 | static HashType64 computeHash(const char *str) |
| 63 | { |