get rid of Buffer::at
This commit is contained in:
parent
6d3e8b00f2
commit
3dd82a2b85
|
@ -128,11 +128,6 @@ String Buffer::string(const BufferIterator& begin, const BufferIterator& end) co
|
|||
return m_content.substr(begin.m_position, end - begin);
|
||||
}
|
||||
|
||||
BufferChar Buffer::at(BufferPos position) const
|
||||
{
|
||||
return m_content[position];
|
||||
}
|
||||
|
||||
void Buffer::begin_undo_group()
|
||||
{
|
||||
assert(m_current_undo_group.empty());
|
||||
|
|
|
@ -167,8 +167,6 @@ public:
|
|||
BufferIterator iterator_at_line_end(const BufferIterator& iterator) const;
|
||||
|
||||
private:
|
||||
BufferChar at(BufferPos position) const;
|
||||
|
||||
friend class BufferIterator;
|
||||
|
||||
std::vector<BufferPos> m_lines;
|
||||
|
|
|
@ -69,7 +69,7 @@ inline bool BufferIterator::operator>=(const BufferIterator& iterator) const
|
|||
inline BufferChar BufferIterator::operator*() const
|
||||
{
|
||||
assert(m_buffer);
|
||||
return m_buffer->at(m_position);
|
||||
return m_buffer->m_content[m_position];
|
||||
}
|
||||
|
||||
inline BufferSize BufferIterator::operator-(const BufferIterator& iterator) const
|
||||
|
|
Loading…
Reference in New Issue
Block a user