1
0
mirror of synced 2026-04-16 01:51:02 +00:00

Merge pull request #5446 from rocallahan/avoid-moved-from

Don't recompute hash using moved-out-of value
This commit is contained in:
Emil J
2025-10-29 16:16:57 +01:00
committed by GitHub

View File

@@ -1021,7 +1021,7 @@ protected:
if (hashtable.empty()) {
entries.emplace_back(std::forward<K>(rvalue), -1);
do_rehash();
hash = do_hash(rvalue);
hash = do_hash(entries.back().udata);
} else {
entries.emplace_back(std::forward<K>(rvalue), hashtable[hash]);
hashtable[hash] = entries.size() - 1;