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

◆ operator|()

bitset_dynamic fl::bitset_dynamic::operator| ( const bitset_dynamic & other) const
inline

Definition at line 388 of file bitset_dynamic.h.

388 {
390
391 if (!_blocks || !other._blocks || !result._blocks) {
392 return result;
393 }
394
395 fl::u32 min_blocks = fl::min(_block_count, other._block_count);
396
397 for (fl::u32 i = 0; i < min_blocks; ++i) {
398 result._blocks[i] = _blocks[i] | other._blocks[i];
399 }
400
401 // Copy remaining blocks from the larger bitset
402 if (_block_count > min_blocks) {
403 fl::memcpy(result._blocks.get() + min_blocks, _blocks.get() + min_blocks,
404 (_block_count - min_blocks) * sizeof(block_type));
405 }
406
407 return result;
408 }
fl::unique_ptr< block_type[]> _blocks
bitset_dynamic()=default
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
Definition math.h:71
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References bitset_dynamic(), _block_count, _blocks, _size, FL_NOEXCEPT, fl::memcpy(), and fl::min().

+ Here is the call graph for this function: