]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetTabular.cpp
Make InsetIterator compatible with range-based loops
[features.git] / src / insets / InsetTabular.cpp
index 627a27ace163e3891625d6879e744a82fb06f0b3..21947f46a5a7e9c45d208581b2fe1118632af804 100644 (file)
@@ -3132,12 +3132,11 @@ void Tabular::TeXRow(otexstream & os, row_type row,
                } else if (ltCaption(row)) {
                        // Inside longtable caption rows, we must only output the caption inset
                        // with its content and omit anything outside of that (see #10791)
-                       InsetIterator it = inset_iterator_begin(*const_cast<InsetTableCell *>(inset));
-                       InsetIterator i_end = inset_iterator_end(*const_cast<InsetTableCell *>(inset));
-                       for (; it != i_end; ++it) {
-                               if (it->lyxCode() != CAPTION_CODE)
+                       InsetTableCell & tc_inset = *const_cast<InsetTableCell *>(inset);
+                       for (Inset const & it : tc_inset) {
+                               if (it.lyxCode() != CAPTION_CODE)
                                        continue;
-                               it->latex(os, runparams);
+                               it.latex(os, runparams);
                                break;
                        }
                } else if (!isPartOfMultiRow(row, c)) {