X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fcursor_slice.C;h=f891844e196547906fa8ac0d54d414290325c0ab;hb=32d281cba0a2e4d0e8425a34a1a8d1f5e7251412;hp=a537aee3aa373a2d9a0d7ca412705c9dc4468dc7;hpb=0d43ba149a41e8860dde316ccbd4336d6b0bbdfa;p=lyx.git diff --git a/src/cursor_slice.C b/src/cursor_slice.C index a537aee3aa..f891844e19 100644 --- a/src/cursor_slice.C +++ b/src/cursor_slice.C @@ -150,7 +150,7 @@ bool operator<(CursorSlice const & p, CursorSlice const & q) if (&p.inset() != &q.inset()) { lyxerr << "can't compare cursor and anchor in different insets\n" << "p: " << p << '\n' << "q: " << q << endl; - return true; + BOOST_ASSERT(false); } if (p.idx() != q.idx()) return p.idx() < q.idx(); @@ -166,6 +166,12 @@ bool operator>(CursorSlice const & p, CursorSlice const & q) } +bool operator<=(CursorSlice const & p, CursorSlice const & q) +{ + return !(q < p); +} + + std::ostream & operator<<(std::ostream & os, CursorSlice const & item) { return os