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

Method all

src/fl/stl/bitset.h:178–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 bool any() const FL_NOEXCEPT { return count() > 0; }
177 bool none() const FL_NOEXCEPT { return count() == 0; }
178 bool all() const FL_NOEXCEPT {
179 if (N == 0)
180 return true;
181
182 // Check all complete blocks
183 for (fl::u32 i = 0; i < block_count - 1; ++i) {
184 if (_blocks[i] != ~block_type(0)) {
185 return false;
186 }
187 }
188
189 // Check the last block
190 if (block_count > 0) {
191 block_type mask;
192 if (N % bits_per_block != 0) {
193 // Create a mask for the valid bits in the last block
194 mask = (block_type(1) << (N % bits_per_block)) - 1;
195 } else {
196 mask = static_cast<block_type>(~block_type(0));
197 }
198
199 if ((_blocks[block_count - 1] & mask) != mask) {
200 return false;
201 }
202 }
203
204 return true;
205 }
206
207 /// Bitwise AND
208 bitset_fixed &operator&=(const bitset_fixed &other) FL_NOEXCEPT {

Callers 7

allMethod · 0.45
fetchAllFilesFunction · 0.45
runFastLEDFunction · 0.45
loadThreeJSModulesFunction · 0.45
processResizeMethod · 0.45
check_file_contentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected