Skip to content

Commit

Permalink
removed useless bitset set_all operation
Browse files Browse the repository at this point in the history
  • Loading branch information
drexlerd committed Jul 24, 2024
1 parent 0d49a75 commit 4e9d362
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions include/flatmemory/details/byte_buffer_segmented.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class ByteBufferSegmented

// Use doubling strategy to make future insertions cheaper.
m_num_bytes_per_segment = std::min(2 * m_num_bytes_per_segment, m_maximum_num_bytes_per_segment);

m_segments.push_back(std::vector<uint8_t>(m_num_bytes_per_segment));
m_capacity += m_num_bytes_per_segment;
m_cur_segment_pos = 0;
Expand Down
13 changes: 0 additions & 13 deletions include/flatmemory/details/types/bitset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,6 @@ class Builder<Bitset<Block, Tag>> : public IBuilder<Builder<Bitset<Block, Tag>>>
// Unset all bits and shrink its size to represent the bits
void unset_all();

// Set all bits and shrink its size to represent the bits
void set_all();

Builder& operator~();

template<IsBitset Other>
Expand Down Expand Up @@ -1557,16 +1554,6 @@ void Builder<Bitset<Block, Tag>>::unset_all()
m_blocks.resize(1);
}

template<IsUnsignedIntegral Block, typename Tag>
void Builder<Bitset<Block, Tag>>::set_all()
{
assert(m_blocks.size() > 0);

m_blocks[0] = (m_default_bit_value) ? BitsetOperator::block_zeroes : BitsetOperator::block_ones;

m_blocks.resize(1);
}

template<IsUnsignedIntegral Block, typename Tag>
Builder<Bitset<Block, Tag>>& Builder<Bitset<Block, Tag>>::operator~()
{
Expand Down

0 comments on commit 4e9d362

Please sign in to comment.