diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-01-25 19:32:06 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-01-25 19:32:06 +0000 |
| commit | a72d185f7940b1d863a32006f34e3e13c0dac016 (patch) | |
| tree | 591fbf79c3e244e61a9f7371aed323d33955a4e3 /src/dynamic_buffer_iterator.hh | |
| parent | 382d5a334c055521893ddd17b2eda1d6d377cb86 (diff) | |
remove DynamicBufferIterator and make Selection a ModificationListener
DynamicBufferIterator is only used by Selections. And each selection
had two iterators, resulting in two ModificationListeners registered
in the buffer instead of one now.
Diffstat (limited to 'src/dynamic_buffer_iterator.hh')
| -rw-r--r-- | src/dynamic_buffer_iterator.hh | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/dynamic_buffer_iterator.hh b/src/dynamic_buffer_iterator.hh deleted file mode 100644 index 873792bd..00000000 --- a/src/dynamic_buffer_iterator.hh +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef dynamic_buffer_iterator_hh_INCLUDED -#define dynamic_buffer_iterator_hh_INCLUDED - -#include "buffer.hh" - -namespace Kakoune -{ - -class DynamicBufferIterator : public BufferIterator, - public ModificationListener -{ -public: - DynamicBufferIterator() : BufferIterator() {} - DynamicBufferIterator(const Buffer& buffer, BufferPos position); - DynamicBufferIterator(const BufferIterator& other); - DynamicBufferIterator(const DynamicBufferIterator& other) - : BufferIterator(other) { register_ifp(); } - - DynamicBufferIterator(DynamicBufferIterator&& other); - DynamicBufferIterator& operator=(const BufferIterator& other); - DynamicBufferIterator& operator=(const DynamicBufferIterator& other) - { return this->operator= (static_cast<const BufferIterator&>(other)); } - ~DynamicBufferIterator(); - - void on_modification(const Modification& modification); - -private: - void register_ifp(); - void unregister_ifn(); -}; - - -} - -#endif // dynamic_buffer_iterator_hh_INCLUDED |
