From: Georg Baum Date: Wed, 18 Mar 2015 21:06:59 +0000 (+0100) Subject: Replace outdated LASSERT X-Git-Tag: 2.2.0alpha1~1127 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c54b1368801d06ed740a24879721dfe599b2166a;hp=74160640337b63b1fb21c9690289f0ebb29c0820;p=lyx.git Replace outdated LASSERT The concept of rows and cols is no longer unique to mathed. Each inset decides itself whether it is grid like or not, so we should not interfere with this in the cursor slice. --- diff --git a/src/CursorSlice.cpp b/src/CursorSlice.cpp index e7ef90e8f3..ae3686fd1e 100644 --- a/src/CursorSlice.cpp +++ b/src/CursorSlice.cpp @@ -80,19 +80,15 @@ pit_type CursorSlice::lastpit() const CursorSlice::row_type CursorSlice::row() const { - // LASSERT: This should only ever be called from an InsetMath. - // Should we crash in release mode, though, or try to continue? - LASSERT(asInsetMath(), /**/); - return asInsetMath()->row(idx_); + LASSERT(inset_, return 0); + return inset_->row(idx_); } CursorSlice::col_type CursorSlice::col() const { - // LASSERT: This should only ever be called from an InsetMath. - // Should we crash in release mode, though, or try to continue? - LASSERT(asInsetMath(), /**/); - return asInsetMath()->col(idx_); + LASSERT(inset_, return 0); + return inset_->col(idx_); }