FastLED 3.9.15
Loading...
Searching...
No Matches

◆ flip() [1/2]

template<uint32_t N>
BitsetFixed & fl::BitsetFixed< N >::flip ( )
inlinenoexcept

Flips all bits.

Definition at line 95 of file bitset.h.

95 {
96 for (uint32_t i = 0; i < block_count; ++i) {
97 _blocks[i] = ~_blocks[i];
98 }
99 // Mask out unused high bits in the last block
100 if (N % bits_per_block != 0) {
102 _blocks[block_count - 1] &= (~block_type(0) >> extra);
103 }
104 return *this;
105 }
static constexpr uint32_t block_count
Definition bitset.h:24
block_type _blocks[block_count]
Definition bitset.h:29
uint64_t block_type
Definition bitset.h:26
static constexpr uint32_t bits_per_block
Definition bitset.h:23
A simple fixed-size Bitset implementation similar to std::Bitset.
Definition bitset.h:21

References BitsetFixed(), _blocks, bits_per_block, and block_count.

+ Here is the call graph for this function: