Skip to content

Commit c9a4c60

Browse files
authored
Merge pull request #5446 from rocallahan/avoid-moved-from
Don't recompute hash using moved-out-of value
2 parents 7f6ea39 + a27b1a8 commit c9a4c60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/hashlib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ class pool
10211021
if (hashtable.empty()) {
10221022
entries.emplace_back(std::forward<K>(rvalue), -1);
10231023
do_rehash();
1024-
hash = do_hash(rvalue);
1024+
hash = do_hash(entries.back().udata);
10251025
} else {
10261026
entries.emplace_back(std::forward<K>(rvalue), hashtable[hash]);
10271027
hashtable[hash] = entries.size() - 1;

0 commit comments

Comments
 (0)