Add preprocessor macro PHMAP_DISABLE_MIX (#259)

* Add preporcessor define to disable mixing (`PHMAP_DISABLE_MIX`).

* Update `README.md`.
This commit is contained in:
Gregory Popovitch
2024-11-02 18:06:56 -04:00
committed by GitHub
parent debe606647
commit a6ce0835ca
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -1892,7 +1892,11 @@ private:
{
template <class K, class... Args>
size_t operator()(const K& key, Args&&...) const {
#if PHMAP_DISABLE_MIX
return h(key);
#else
return phmap_mix<sizeof(size_t)>()(h(key));
#endif
}
const hasher& h;
};
@@ -3749,7 +3753,11 @@ private:
{
template <class K, class... Args>
size_t operator()(const K& key, Args&&...) const {
#if PHMAP_DISABLE_MIX
return h(key);
#else
return phmap_mix<sizeof(size_t)>()(h(key));
#endif
}
const hasher& h;
};