Skip to content

Commit

Permalink
added const
Browse files Browse the repository at this point in the history
  • Loading branch information
drexlerd committed Feb 12, 2024
1 parent 540532c commit 42e904f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/flatmemory/details/types/bitset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ namespace flatmemory
}

/// @brief Find the last block that differs from the default block
size_t find_last_non_default_block() {
size_t find_last_non_default_block() const {
const auto default_block = m_default_bit_value ? block_ones : block_zeroes;
auto last_relevant_block_index = static_cast<int64_t>(m_blocks->size()) - 1;
for (; (last_relevant_block_index >= 0) && ((*m_blocks)[last_relevant_block_index] == default_block); --last_relevant_block_index)
Expand All @@ -704,7 +704,7 @@ namespace flatmemory
}

/// @brief Find last non default bit that differs from a non default bit value
size_t find_last_non_default_bit(size_t block_index) {
size_t find_last_non_default_bit(size_t block_index) const {
assert(block_index < m_blocks->size());
Block block = (*m_blocks)[block_index];
size_t last_non_default_bit_index = sizeof(Block) - 1;
Expand Down

0 comments on commit 42e904f

Please sign in to comment.