Skip to content

Commit 3450a1f

Browse files
committed
Use bit_xor, use default offset in shift_left.
1 parent 7cf9b83 commit 3450a1f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

include/bitcoin/system/impl/hash/functions.ipp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ INLINE constexpr size_t djb2_hash(const data_slice& data) NOEXCEPT
236236
return hash;
237237
}
238238

239-
// Formerly: return left ^ shift_left(right, one);
240239
// Combine hash values, such as djb2_hash or unique_hash outputs.
241240
INLINE constexpr size_t hash_combine(size_t left, size_t right) NOEXCEPT
242241
{
@@ -262,7 +261,7 @@ INLINE constexpr size_t hash_combine(size_t left, size_t right) NOEXCEPT
262261
////first ^= shift_right(first, 29);
263262

264263
////return first;
265-
return left ^ shift_left(right, one);
264+
return bit_xor(left, shift_left(right));
266265
}
267266

268267
} // namespace system

0 commit comments

Comments
 (0)