diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-01-23 14:25:48 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-01-23 14:39:33 +0100 |
| commit | 3404366b6593bbf372da35ef8c7ce6cde429cef7 (patch) | |
| tree | 9ca629f41dcb6809a8fd35fda53dd715a9771829 /src/selection.cc | |
| parent | f14bc5e31004b37e90ba000a0714aa83e7f2763e (diff) | |
add more asserts
Diffstat (limited to 'src/selection.cc')
| -rw-r--r-- | src/selection.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/selection.cc b/src/selection.cc index bc156f26..77511c00 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -26,8 +26,10 @@ BufferIterator Range::end() const void Range::check_invariant() const { - assert(utf8::is_character_start(first())); - assert(utf8::is_character_start(last())); + assert(m_first.is_valid()); + assert(m_last.is_valid()); + assert(utf8::is_character_start(m_first)); + assert(utf8::is_character_start(m_last)); } static void avoid_eol(BufferIterator& it) |
