X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fdecodetrace.cpp;h=b2ead1a66848600e1ae11425fe874d708b73f39a;hp=95e0e5e9ef0f2d4ddfd0692da1ab478846351190;hb=da50281d69f15d125b56971a3009fd31cbbab58b;hpb=f74015db20c1ac85df6397df7199a030e6db828f diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 95e0e5e9..b2ead1a6 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -199,8 +199,8 @@ void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp) const vector rows(decoder_stack_->get_visible_rows()); visible_rows_.clear(); - for (size_t i = 0; i < rows.size(); i++) { - const Row &row = rows[i]; + for (auto i : rows) { + const Row &row = i; // Cache the row title widths int row_title_width; @@ -229,7 +229,7 @@ void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp) y += row_height_; - visible_rows_.push_back(rows[i]); + visible_rows_.push_back(i); } }