mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-08 03:59:18 +02:00
refactor: Fix implicit-signed-integer-truncation in cuckoocache.h
This commit is contained in:
parent
b4f647fa36
commit
fa7da227da
@ -89,7 +89,7 @@ public:
|
||||
*/
|
||||
inline void bit_set(uint32_t s)
|
||||
{
|
||||
mem[s >> 3].fetch_or(1 << (s & 7), std::memory_order_relaxed);
|
||||
mem[s >> 3].fetch_or(uint8_t(1 << (s & 7)), std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
/** bit_unset marks an entry as something that should not be overwritten.
|
||||
@ -100,7 +100,7 @@ public:
|
||||
*/
|
||||
inline void bit_unset(uint32_t s)
|
||||
{
|
||||
mem[s >> 3].fetch_and(~(1 << (s & 7)), std::memory_order_relaxed);
|
||||
mem[s >> 3].fetch_and(uint8_t(~(1 << (s & 7))), std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
/** bit_is_set queries the table for discardability at `s`.
|
||||
|
@ -86,7 +86,6 @@ implicit-signed-integer-truncation:addrman.cpp
|
||||
implicit-signed-integer-truncation:addrman.h
|
||||
implicit-signed-integer-truncation:chain.h
|
||||
implicit-signed-integer-truncation:crypto/
|
||||
implicit-signed-integer-truncation:cuckoocache.h
|
||||
implicit-signed-integer-truncation:leveldb/
|
||||
implicit-signed-integer-truncation:node/miner.cpp
|
||||
implicit-signed-integer-truncation:net.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user