From: Alfredo Braunstein Date: Thu, 23 Aug 2007 21:00:41 +0000 (+0000) Subject: allow one past-the-end position in CursorSlice, as it eases iteration X-Git-Tag: 1.6.10~8726 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=fbf4b51c7b2bb4bc355dcd0ae45cfdc277f8f1d8;p=lyx.git allow one past-the-end position in CursorSlice, as it eases iteration git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19760 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/CursorSlice.cpp b/src/CursorSlice.cpp index 85db51a0d2..42c2614589 100644 --- a/src/CursorSlice.cpp +++ b/src/CursorSlice.cpp @@ -102,15 +102,11 @@ void CursorSlice::forwardPos() return; } - // otherwise try to move on one cell if possible - if (idx() < lastidx()) { - //lyxerr << "... next idx" << endl; - ++idx(); - pit() = 0; - pos() = 0; - return; - } - BOOST_ASSERT(false); + // otherwise move on one cell + //lyxerr << "... next idx" << endl; + ++idx(); + pit() = 0; + pos() = 0; }