mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
refactor: Fix implicit-signed-integer-truncation in cuckoocache.h
This commit is contained in:
@@ -89,7 +89,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
inline void bit_set(uint32_t s)
|
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.
|
/** bit_unset marks an entry as something that should not be overwritten.
|
||||||
@@ -100,7 +100,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
inline void bit_unset(uint32_t s)
|
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`.
|
/** 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:addrman.h
|
||||||
implicit-signed-integer-truncation:chain.h
|
implicit-signed-integer-truncation:chain.h
|
||||||
implicit-signed-integer-truncation:crypto/
|
implicit-signed-integer-truncation:crypto/
|
||||||
implicit-signed-integer-truncation:cuckoocache.h
|
|
||||||
implicit-signed-integer-truncation:leveldb/
|
implicit-signed-integer-truncation:leveldb/
|
||||||
implicit-signed-integer-truncation:node/miner.cpp
|
implicit-signed-integer-truncation:node/miner.cpp
|
||||||
implicit-signed-integer-truncation:net.cpp
|
implicit-signed-integer-truncation:net.cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user