From: Richard Kimberly Heck Date: Tue, 28 Nov 2023 02:33:46 +0000 (-0500) Subject: Better variable name X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1aa890629bb35ccfc85178f1dbcf5f39bb6519d9;p=features.git Better variable name I think this one must be a leftover from before the ranges. --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 5ac03fa474..696f5030ee 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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()) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 9003652992..7dbf43e3a7 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -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; }