]> git.lyx.org Git - lyx.git/commitdiff
Better variable name
authorRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 28 Nov 2023 02:33:46 +0000 (21:33 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 28 Nov 2023 02:35:54 +0000 (21:35 -0500)
I think this one must be a leftover from before the ranges.

src/Paragraph.cpp
src/insets/InsetText.cpp

index 5ac03fa474429cbfecfbcbb0394e0ec53fb04677..696f5030ee4bc16d6e0e65655ac58758b9acecf9 100644 (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())
index 9003652992d4bf82145d3f16eb3034d6e803c8de..7dbf43e3a7afc9d5757cc2e406f02314fcc18576 100644 (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;
                }