optimization.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16646 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-01-11 15:58:26 +00:00
parent 8106f1809f
commit c61134852e

View File

@ -473,17 +473,16 @@ void setLabel(Buffer const & buf, ParIterator & it, LyXTextClass const & textcla
// In biblio should't be following counters but... // In biblio should't be following counters but...
} else if (layout->labeltype == LABEL_SENSITIVE) { } else if (layout->labeltype == LABEL_SENSITIVE) {
// Search for the first float or wrap inset in the iterator // Search for the first float or wrap inset in the iterator
docstring type;
size_t i = it.depth(); size_t i = it.depth();
InsetBase * in;
while (i > 0) { while (i > 0) {
--i; --i;
InsetBase * const in = &it[i].inset(); in = &it[i].inset();
if (in->lyxCode() == InsetBase::FLOAT_CODE if (in->lyxCode() == InsetBase::FLOAT_CODE
|| in->lyxCode() == InsetBase::WRAP_CODE) { || in->lyxCode() == InsetBase::WRAP_CODE)
type = in->getInsetName();
break; break;
}
} }
docstring const & type = in->getInsetName();
docstring s; docstring s;
if (!type.empty()) { if (!type.empty()) {