get rid of Buffer::at

This commit is contained in:
Maxime Coste 2012-03-19 14:04:33 +00:00
parent 6d3e8b00f2
commit 3dd82a2b85
3 changed files with 1 additions and 8 deletions

View File

@ -128,11 +128,6 @@ String Buffer::string(const BufferIterator& begin, const BufferIterator& end) co
return m_content.substr(begin.m_position, end - begin); return m_content.substr(begin.m_position, end - begin);
} }
BufferChar Buffer::at(BufferPos position) const
{
return m_content[position];
}
void Buffer::begin_undo_group() void Buffer::begin_undo_group()
{ {
assert(m_current_undo_group.empty()); assert(m_current_undo_group.empty());

View File

@ -167,8 +167,6 @@ public:
BufferIterator iterator_at_line_end(const BufferIterator& iterator) const; BufferIterator iterator_at_line_end(const BufferIterator& iterator) const;
private: private:
BufferChar at(BufferPos position) const;
friend class BufferIterator; friend class BufferIterator;
std::vector<BufferPos> m_lines; std::vector<BufferPos> m_lines;

View File

@ -69,7 +69,7 @@ inline bool BufferIterator::operator>=(const BufferIterator& iterator) const
inline BufferChar BufferIterator::operator*() const inline BufferChar BufferIterator::operator*() const
{ {
assert(m_buffer); assert(m_buffer);
return m_buffer->at(m_position); return m_buffer->m_content[m_position];
} }
inline BufferSize BufferIterator::operator-(const BufferIterator& iterator) const inline BufferSize BufferIterator::operator-(const BufferIterator& iterator) const