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

◆ test()

template<uint32_t N>
bool fl::BitsetFixed< N >::test ( uint32_t pos) const
inlinenoexcept

Tests whether the bit at position pos is set.

Definition at line 108 of file bitset.h.

108 {
109 if (pos < N) {
110 const uint32_t idx = pos / bits_per_block;
111 const uint32_t off = pos % bits_per_block;
112 return (_blocks[idx] >> off) & 1;
113 }
114 return false;
115 }
block_type _blocks[block_count]
Definition bitset.h:29
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 _blocks, bits_per_block, and pos.

Referenced by operator[](), and fl::BitsetInlined< N >::resize().

+ Here is the caller graph for this function: