add GapBuffer::Iterator::operator*()

This commit is contained in:
Josh Holtrop 2016-11-02 21:16:20 -04:00
parent 35b35cb2f1
commit dcba852712

View File

@ -28,6 +28,17 @@ public:
{ {
return m_gap_buffer->address(m_offset); return m_gap_buffer->address(m_offset);
} }
uint32_t operator*() const
{
if (valid())
{
return Encoding::decode(m_gap_buffer->m_encoding, address());
}
else
{
return 0xFFFFFFFFu;
}
}
protected: protected:
GapBuffer * m_gap_buffer; GapBuffer * m_gap_buffer;