diff options
Diffstat (limited to 'src/cuckoocache.h')
-rw-r--r-- | src/cuckoocache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cuckoocache.h b/src/cuckoocache.h index 1166466771..15cb55c3ce 100644 --- a/src/cuckoocache.h +++ b/src/cuckoocache.h @@ -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`. |