diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-11-12 20:11:27 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-11-12 20:11:27 +0100 |
| commit | 77272db0fd28af7ee9ade28434c52e628e4d5a32 (patch) | |
| tree | 7c1b53d130b2ccfab4e3177d6354048aa238874c /src/selection.cc | |
| parent | 489621cf580b8eaca3b220f2be2512d72098f736 (diff) | |
make Buffer::{add,remove}_change_listener const and the listener list mutable
Diffstat (limited to 'src/selection.cc')
| -rw-r--r-- | src/selection.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/selection.cc b/src/selection.cc index baab004d..08456860 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -86,14 +86,12 @@ void Selection::on_erase(const BufferIterator& begin, const BufferIterator& end) void Selection::register_with_buffer() { - Buffer& buffer = const_cast<Buffer&>(m_first.buffer()); - buffer.add_change_listener(*this); + m_first.buffer().add_change_listener(*this); } void Selection::unregister_with_buffer() { - Buffer& buffer = const_cast<Buffer&>(m_first.buffer()); - buffer.remove_change_listener(*this); + m_first.buffer().remove_change_listener(*this); } void Selection::check_invariant() const |
