Better variable name

I think this one must be a leftover from before the ranges.
This commit is contained in:
Richard Kimberly Heck 2023-11-27 21:33:46 -05:00
parent 731c2e2c35
commit 1aa890629b
2 changed files with 8 additions and 8 deletions

View File

@ -2375,8 +2375,8 @@ bool Paragraph::allowedInContext(Cursor const & cur, InsetLayout const & il) con
if (in_allowed_inset && inInset().asInsetText() && il.allowedOccurrences() != -1) {
ParagraphList & pars = cur.text()->paragraphs();
for (Paragraph const & par : pars) {
for (auto const & table : par.insetList())
if (table.inset->getLayout().name() == il.name())
for (auto const & elem : par.insetList())
if (elem.inset->getLayout().name() == il.name())
++have_ins;
}
if (have_ins >= il.allowedOccurrences())
@ -2412,8 +2412,8 @@ bool Paragraph::allowedInContext(Cursor const & cur, InsetLayout const & il) con
for (; pit <= lastpit; ++pit) {
if (&pars[pit].layout() != d->layout_)
break;
for (auto const & table : pars[pit].insetList())
if (table.inset->getLayout().name() == il.name())
for (auto const & elem : pars[pit].insetList())
if (elem.inset->getLayout().name() == il.name())
++have_ins;
}
if (have_ins >= il.allowedOccurrences())

View File

@ -1195,10 +1195,10 @@ void InsetText::iterateForToc(DocIterator const & cdit, bool output_active,
// If we find an InsetArgument that is supposed to provide the TOC caption,
// we'll save it for use later.
InsetArgument const * arginset = nullptr;
for (auto const & table : par.insetList()) {
dit.pos() = table.pos;
table.inset->addToToc(dit, doing_output, utype, backend);
if (InsetArgument const * x = table.inset->asInsetArgument())
for (auto const & elem : par.insetList()) {
dit.pos() = elem.pos;
elem.inset->addToToc(dit, doing_output, utype, backend);
if (InsetArgument const * x = elem.inset->asInsetArgument())
if (x->isTocCaption())
arginset = x;
}