diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-06-06 19:39:53 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-06-06 19:44:08 +0200 |
| commit | 2a74b0e9e23e927121908ef534393ffd1b80e8ca (patch) | |
| tree | 5a7f99c72ff80ed959eb4264f58aaf451d39f7f0 /src/buffer.hh | |
| parent | cf454ef904a93185c3e5318bc7b5c1d3d08fea39 (diff) | |
Buffer: insert and erase go back to taking iterators, and return iterators
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index 26fa584a..61b9179e 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -100,8 +100,8 @@ public: bool set_name(String name); - void insert(BufferCoord pos, String content); - void erase(BufferCoord begin, BufferCoord end); + BufferIterator insert(const BufferIterator& pos, String content); + BufferIterator erase(BufferIterator begin, BufferIterator end); size_t timestamp() const { return m_timestamp; } @@ -160,8 +160,6 @@ public: void check_invariant() const; private: - friend class BufferIterator; - struct Line { ByteCount start; @@ -179,8 +177,8 @@ private: }; LineList m_lines; - void do_insert(const BufferCoord& pos, const String& content); - void do_erase(const BufferCoord& begin, const BufferCoord& end); + BufferCoord do_insert(const BufferCoord& pos, const String& content); + BufferCoord do_erase(const BufferCoord& begin, const BufferCoord& end); String m_name; Flags m_flags; |
