]> git.lyx.org Git - features.git/commitdiff
Use ranges
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 4 Dec 2022 17:06:48 +0000 (12:06 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 4 Dec 2022 17:06:48 +0000 (12:06 -0500)
src/Paragraph.cpp

index 453b1e1bb57e8c75d775410b8ecdc2cd2018b372..6b156b9dac04f9b65b5b46eefd27b5c0b1eaff1e 100644 (file)
@@ -4009,16 +4009,10 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
                // FIXME XHTML
                // Other such tags? What about the other text ranges?
 
-               vector<xml::EndFontTag>::const_iterator cit = tagsToClose.begin();
-               vector<xml::EndFontTag>::const_iterator cen = tagsToClose.end();
-               for (; cit != cen; ++cit)
-                       xs << *cit;
-
-               vector<xml::FontTag>::const_iterator sit = tagsToOpen.begin();
-               vector<xml::FontTag>::const_iterator sen = tagsToOpen.end();
-               for (; sit != sen; ++sit)
-                       xs << *sit;
-
+               for (auto const & t : tagsToClose)
+                       xs << t;
+               for (auto const & t : tagsToOpen)
+                       xs << t;
                tagsToClose.clear();
                tagsToOpen.clear();