MCPcopy Create free account
hub / github.com/FastLED/FastLED / test

Method test

src/fl/stl/bitset.h:135–142  ·  view source on GitHub ↗

Tests whether the bit at position pos is set.

Source from the content-addressed store, hash-verified

133
134 /// Tests whether the bit at position pos is set.
135 bool test(fl::u32 pos) const FL_NOEXCEPT {
136 if (pos < N) {
137 const fl::u32 idx = pos / bits_per_block;
138 const fl::u32 off = pos % bits_per_block;
139 return (_blocks[idx] >> off) & 1;
140 }
141 return false;
142 }
143
144 /// Returns the value of the bit at position pos.
145 bool operator[](fl::u32 pos) const FL_NOEXCEPT { return test(pos); }

Callers 15

is_occupiedFunction · 0.45
is_deletedFunction · 0.45
rehash_internalFunction · 0.45
rehash_inline_no_resizeFunction · 0.45
ProxyClass · 0.45
ProxyClass · 0.45
resizeMethod · 0.45
testMethod · 0.45
operator&Method · 0.45
operator|Method · 0.45
operator^Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected