From: Abdelrazak Younes Date: Thu, 11 Jan 2007 18:25:11 +0000 (+0000) Subject: tiny optimisation. X-Git-Tag: 1.6.10~11222 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5078b7ab5701b424a34acf107fb596c8b3bce3f0;p=lyx.git tiny optimisation. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16652 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/dociterator.C b/src/dociterator.C index 7221d1438c..5b43b85310 100644 --- a/src/dociterator.C +++ b/src/dociterator.C @@ -274,11 +274,12 @@ void DocIterator::forwardPos(bool ignorecollapsed) return; } + InsetBase * nextinset = nextInset(); // jump over collapsables if they are collapsed // FIXME: the check for asInsetMath() shouldn't be necessary // but math insets do not return a sensible editable() state yet. - if (ignorecollapsed && nextInset() && (!nextInset()->asInsetMath() - && nextInset()->editable() != InsetBase::HIGHLY_EDITABLE)) { + if (ignorecollapsed && nextinset && (!nextinset->asInsetMath() + && nextinset->editable() != InsetBase::HIGHLY_EDITABLE)) { ++top().pos(); return; }