3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-05 05:49:15 +00:00

Don't recompute hash using moved-out-of value

This commit is contained in:
Robert O'Callahan 2025-10-27 20:32:12 +00:00
parent 37875fdedf
commit a27b1a83ae

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;