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

◆ operator^()

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

Definition at line 404 of file bitset_dynamic.h.

404 {
405 bitset_dynamic result(_size);
406
407 if (!_blocks || !other._blocks || !result._blocks) {
408 return result;
409 }
410
411 fl::u32 min_blocks = MIN(_block_count, other._block_count);
412
413 for (fl::u32 i = 0; i < min_blocks; ++i) {
414 result._blocks[i] = _blocks[i] ^ other._blocks[i];
415 }
416
417 // Copy remaining blocks from the larger bitset
418 if (_block_count > min_blocks) {
419 memcpy(result._blocks + min_blocks, _blocks + min_blocks,
420 (_block_count - min_blocks) * sizeof(block_type));
421 }
422
423 return result;
424 }
block_type * _blocks
bitset_dynamic()=default
#define MIN(a, b)
Definition math_macros.h:41

References bitset_dynamic(), _block_count, _blocks, _size, and MIN.

+ Here is the call graph for this function: