summaryrefslogtreecommitdiff
path: root/src/selection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/selection.cc')
-rw-r--r--src/selection.cc6
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