]> git.lyx.org Git - features.git/commitdiff
use range-based for loops
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 7 Jan 2019 12:50:55 +0000 (13:50 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:55 +0000 (14:39 +0200)
src/RowPainter.cpp

index a92461460e552dfc33a49dfa3ec0f0d3bc01230c..e547888cf9bd7b82ffb5daec3451aa248e785843 100644 (file)
@@ -580,10 +580,7 @@ void RowPainter::paintLast() const
 
 void RowPainter::paintOnlyInsets()
 {
-       Row::const_iterator cit = row_.begin();
-       Row::const_iterator const & end = row_.end();
-       for ( ; cit != end ; ++cit) {
-               Row::Element const & e = *cit;
+       for (Row::Element const & e : row_) {
                if (e.type == Row::INSET) {
                        paintInset(e);
                        // The markings of foreign languages
@@ -601,11 +598,7 @@ void RowPainter::paintOnlyInsets()
 
 void RowPainter::paintText()
 {
-       Row::const_iterator cit = row_.begin();
-       Row::const_iterator const & end = row_.end();
-       for ( ; cit != end ; ++cit) {
-               Row::Element const & e = *cit;
-
+       for (Row::Element const & e : row_) {
                switch (e.type) {
                case Row::STRING:
                case Row::VIRTUAL: