From 17d6a993fc17d533460c5f40f3908c708e057c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 23 May 2024 18:45:17 +0200 Subject: Merging upstream version 18.2.3. Signed-off-by: Daniel Baumann --- src/common/bit_vector.hpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/common/bit_vector.hpp') diff --git a/src/common/bit_vector.hpp b/src/common/bit_vector.hpp index 9ce3e8b1e..961d9a019 100644 --- a/src/common/bit_vector.hpp +++ b/src/common/bit_vector.hpp @@ -83,7 +83,7 @@ public: }; public: - template + template class IteratorImpl { private: friend class BitVector; @@ -94,7 +94,7 @@ public: // cached derived values uint64_t m_index = 0; uint64_t m_shift = 0; - DataIterator m_data_iterator; + DataIteratorT m_data_iterator; IteratorImpl(BitVectorT *bit_vector, uint64_t offset) : m_bit_vector(bit_vector), @@ -129,7 +129,7 @@ public: inline IteratorImpl operator++(int) { IteratorImpl iterator_impl(*this); - ++iterator_impl; + ++*this; return iterator_impl; } inline IteratorImpl operator+(uint64_t offset) { @@ -145,17 +145,15 @@ public: return (m_offset != rhs.m_offset || m_bit_vector != rhs.m_bit_vector); } - inline ConstReference operator*() const { - return ConstReference(m_data_iterator, m_shift); - } - inline Reference operator*() { - return Reference(m_data_iterator, m_shift); + inline ReferenceT operator*() const { + return ReferenceT(m_data_iterator, m_shift); } }; typedef IteratorImpl ConstIterator; - typedef IteratorImpl Iterator; + bufferlist::const_iterator, + ConstReference> ConstIterator; + typedef IteratorImpl Iterator; static const uint32_t BLOCK_SIZE; static const uint8_t BIT_COUNT = _bit_count; -- cgit v1.2.3