]> sigrok.org Git - pulseview.git/commitdiff
DecodeTrace: Optimize loop (see also da50281d)
authorSoeren Apel <redacted>
Tue, 16 Feb 2016 20:14:41 +0000 (21:14 +0100)
committerSoeren Apel <redacted>
Tue, 16 Feb 2016 20:14:41 +0000 (21:14 +0100)
pv/view/decodetrace.cpp

index e5b84f9945b54788ed4b8c36ad1da5e56ddc7b51..6bafa11e8c3a8d3ad2075fa0e7107fe51e073fdb 100644 (file)
@@ -199,9 +199,7 @@ void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
        const vector<Row> rows(decoder_stack_->get_visible_rows());
 
        visible_rows_.clear();
-       for (auto i : rows) {
-               const Row &row = i;
-
+       for (const Row& row : rows) {
                // Cache the row title widths
                int row_title_width;
                try {
@@ -229,7 +227,7 @@ void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
 
                        y += row_height_;
 
-                       visible_rows_.push_back(i);
+                       visible_rows_.push_back(row);
                }
        }