diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-03-19 14:04:33 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-03-19 14:04:33 +0000 |
| commit | 3dd82a2b8515fccbd5a31a90f5da4d969dbb4a23 (patch) | |
| tree | 770e8fb4f0cb5e75e9acdee596c19ec3dd1d1ba6 /src | |
| parent | 6d3e8b00f28728d281eaf7b92a4ba8d9d0ab655e (diff) | |
get rid of Buffer::at
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.cc | 5 | ||||
| -rw-r--r-- | src/buffer.hh | 2 | ||||
| -rw-r--r-- | src/buffer_iterator.inl.hh | 2 |
3 files changed, 1 insertions, 8 deletions
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<BufferPos> 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 |
