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

◆ set()

template<uint32_t N>
BitsetFixed & fl::BitsetFixed< N >::set ( uint32_t pos,
bool value = true )
inline

Sets or clears the bit at position pos.

Definition at line 59 of file bitset.h.

59 {
60 if (pos < N) {
63 if (value) {
64 _blocks[idx] |= (block_type(1) << off);
65 } else {
66 _blocks[idx] &= ~(block_type(1) << off);
67 }
68 }
69 return *this;
70 }
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 pos.

Referenced by assign(), reset(), and fl::BitsetInlined< N >::resize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: