mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-05 13:56:04 +00:00
Don't recompute hash using moved-out-of value
This commit is contained in:
parent
37875fdedf
commit
a27b1a83ae
1 changed files with 1 additions and 1 deletions
|
|
@ -1021,7 +1021,7 @@ protected:
|
||||||
if (hashtable.empty()) {
|
if (hashtable.empty()) {
|
||||||
entries.emplace_back(std::forward<K>(rvalue), -1);
|
entries.emplace_back(std::forward<K>(rvalue), -1);
|
||||||
do_rehash();
|
do_rehash();
|
||||||
hash = do_hash(rvalue);
|
hash = do_hash(entries.back().udata);
|
||||||
} else {
|
} else {
|
||||||
entries.emplace_back(std::forward<K>(rvalue), hashtable[hash]);
|
entries.emplace_back(std::forward<K>(rvalue), hashtable[hash]);
|
||||||
hashtable[hash] = entries.size() - 1;
|
hashtable[hash] = entries.size() - 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue