diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-06-04 19:23:11 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-06-06 19:44:07 +0200 |
| commit | 6b667bc803557de2d83cdc5f562c286bb66f86fa (patch) | |
| tree | a65118c4fad1bce6fdbfb5b5578d93f19356742c /src/buffer.hh | |
| parent | 777158e86dd284014657e572fd4c49ca947d6812 (diff) | |
remove BufferIterator conversion to/from BufferCoord
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index b2d5c793..7aacb841 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -59,9 +59,6 @@ public: BufferIterator operator++ (int); BufferIterator operator-- (int); - BufferIterator& operator=(const BufferCoord& coord); - operator const BufferCoord&() const { return m_coord; } - const BufferCoord& coord() const { return m_coord; } private: @@ -127,6 +124,9 @@ public: BufferCoord char_next(BufferCoord coord) const; BufferCoord char_prev(BufferCoord coord) const; + BufferCoord back_coord() const { return { line_count() - 1, m_lines.back().length() - 1 }; } + BufferCoord end_coord() const { return { line_count() - 1, m_lines.back().length() }; } + bool is_valid(const BufferCoord& c) const; bool is_end(const BufferCoord& c) const; |
