43 if (other._size > 0) {
53 other._block_count = 0;
60 if (other._size > 0) {
77 other._block_count = 0;
104 _blocks[last_block_idx] &= mask;
118 if (new_size ==
_size)
144 _blocks[last_block_idx] &= mask;
237 _blocks[last_block_idx] &= mask;
248 return (
_blocks[idx] >> off) & 1;
260 result +=
static_cast<fl::u32
>(__builtin_popcount(
_blocks[i]));
332 for (fl::u32 block_idx = start_block; block_idx <
_block_count; ++block_idx) {
341 current_block &= mask;
346 current_block = ~current_block;
350 if (block_idx == start_block && start_bit > 0) {
351 current_block &= ~static_cast<block_type>(((
block_type(1) << start_bit) - 1));
355 if (current_block != 0) {
357 fl::u32 bit_pos =
static_cast<fl::u32
>(__builtin_ctz(current_block));
361 if (absolute_pos <
_size) {
362 return static_cast<fl::i32
>(absolute_pos);
380 for (fl::u32 i = 0; i < min_blocks; ++i) {
397 for (fl::u32 i = 0; i < min_blocks; ++i) {
420 for (fl::u32 i = 0; i < min_blocks; ++i) {
451 result._blocks[last_block_idx] &= mask;
bitset_dynamic & operator=(bitset_dynamic &&other) FL_NOEXCEPT
bitset_dynamic operator&(const bitset_dynamic &other) const FL_NOEXCEPT
bitset_dynamic operator|(const bitset_dynamic &other) const FL_NOEXCEPT
FL_DISABLE_WARNING_POP FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE void reset(fl::u32 pos) FL_NOEXCEPT
FL_DISABLE_WARNING_POP FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE void resize(fl::u32 new_size) FL_NOEXCEPT
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE void flip(fl::u32 pos) FL_NOEXCEPT
fl::unique_ptr< block_type[]> _blocks
bitset_dynamic operator~() const FL_NOEXCEPT
bool none() const FL_NOEXCEPT
static fl::u32 calc_block_count(fl::u32 bit_count) FL_NOEXCEPT
FL_DISABLE_WARNING_POP void clear() FL_NOEXCEPT
bool operator[](fl::u32 pos) const FL_NOEXCEPT
bitset_dynamic(fl::u32 size) FL_NOEXCEPT
FL_DISABLE_WARNING_POP FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE void set(fl::u32 pos) FL_NOEXCEPT
FL_DISABLE_WARNING_POP void to_string(string *dst) const FL_NOEXCEPT
void pop_back() FL_NOEXCEPT
FL_DISABLE_WARNING_POP void flip() FL_NOEXCEPT
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE void reset() FL_NOEXCEPT
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE bool test(fl::u32 pos) const FL_NOEXCEPT
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE fl::u32 size() const FL_NOEXCEPT
~bitset_dynamic()=default
bitset_dynamic(bitset_dynamic &&other) FL_NOEXCEPT
bitset_dynamic operator^(const bitset_dynamic &other) const FL_NOEXCEPT
void push_back() FL_NOEXCEPT
bitset_dynamic & operator=(const bitset_dynamic &other) FL_NOEXCEPT
static constexpr fl::u32 bits_per_block
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_NULL_DEREFERENCE void assign(fl::u32 n, bool value) FL_NOEXCEPT
fl::i32 find_first(bool test_value, fl::u32 offset=0) const FL_NOEXCEPT
Finds the first bit that matches the test value.
bool any() const FL_NOEXCEPT
bitset_dynamic(const bitset_dynamic &other) FL_NOEXCEPT
bool all() const FL_NOEXCEPT
FL_DISABLE_WARNING_POP void set(fl::u32 pos, bool value) FL_NOEXCEPT
FL_DISABLE_WARNING_POP fl::u32 count() const FL_NOEXCEPT
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
void to_string(const fl::u16 *bit_data, fl::u32 bit_count, string *dst)
Compile-time linker keep-alive hook for a single fl::Bus.
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT
constexpr int type_rank< T >::value
void * memset(void *s, int c, size_t n) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
Base definition for an LED controller.
#define FL_DISABLE_WARNING_PUSH
#define FL_DISABLE_WARNING_NULL_DEREFERENCE
#define FL_DISABLE_WARNING_POP