diff --git a/src/buffer.cc b/src/buffer.cc index 1e86f5c4..fb4c61ad 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -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()); diff --git a/src/buffer.hh b/src/buffer.hh index 00b7764c..60e6f7e2 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -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 m_lines; diff --git a/src/buffer_iterator.inl.hh b/src/buffer_iterator.inl.hh index feae368d..d7def812 100644 --- a/src/buffer_iterator.inl.hh +++ b/src/buffer_iterator.inl.hh @@ -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