diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-02-01 11:20:05 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-02-01 11:19:18 +0100 |
commit | fad84a25956ec081f22aebbda309d168a3dc0004 (patch) | |
tree | b93553b9bc81d99021071cf5413052089069e4a7 /src/common/bloom.cpp | |
parent | fa041878de786f5be74ec74a06ec407c99ca8656 (diff) |
refactor: Fixup uint64_t-cast style in touched line
Diffstat (limited to 'src/common/bloom.cpp')
-rw-r--r-- | src/common/bloom.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/bloom.cpp b/src/common/bloom.cpp index 7a3847620e..8b32a6c94a 100644 --- a/src/common/bloom.cpp +++ b/src/common/bloom.cpp @@ -218,8 +218,8 @@ void CRollingBloomFilter::insert(Span<const unsigned char> vKey) /* FastMod works with the upper bits of h, so it is safe to ignore that the lower bits of h are already used for bit. */ uint32_t pos = FastRange32(h, data.size()); /* The lowest bit of pos is ignored, and set to zero for the first bit, and to one for the second. */ - data[pos & ~1U] = (data[pos & ~1U] & ~(((uint64_t)1) << bit)) | ((uint64_t)(nGeneration & 1)) << bit; - data[pos | 1] = (data[pos | 1] & ~(((uint64_t)1) << bit)) | ((uint64_t)(nGeneration >> 1)) << bit; + data[pos & ~1U] = (data[pos & ~1U] & ~(uint64_t{1} << bit)) | (uint64_t(nGeneration & 1)) << bit; + data[pos | 1] = (data[pos | 1] & ~(uint64_t{1} << bit)) | (uint64_t(nGeneration >> 1)) << bit; } } |