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

◆ operator^()

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

Definition at line 411 of file bitset_dynamic.h.

411 {
413
414 if (!_blocks || !other._blocks || !result._blocks) {
415 return result;
416 }
417
418 fl::u32 min_blocks = fl::min(_block_count, other._block_count);
419
420 for (fl::u32 i = 0; i < min_blocks; ++i) {
421 result._blocks[i] = _blocks[i] ^ other._blocks[i];
422 }
423
424 // Copy remaining blocks from the larger bitset
425 if (_block_count > min_blocks) {
426 fl::memcpy(result._blocks.get() + min_blocks, _blocks.get() + min_blocks,
427 (_block_count - min_blocks) * sizeof(block_type));
428 }
429
430 return result;
431 }
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: