3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-25 15:09:34 +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
commit c9a4c608ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;