mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: replace Q_FOREACH by range-based for in profile code
With Qt-containers, this might be a small pessimization, because it might lead to a deep copy. This can be "fixed" by for (const Type &item: qAsConst(container)) But frankly, I don't care. Ultimately it is probably best to replace the Qt containers by standard containers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4128fec1ea
commit
3f2e4e8b16
3 changed files with 8 additions and 11 deletions
|
@ -826,7 +826,7 @@ void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphics
|
|||
|
||||
QPolygonF poly;
|
||||
painter->setPen(QPen(alertColor, pWidth));
|
||||
Q_FOREACH (const QPolygonF &poly, alertPolygons)
|
||||
for (const QPolygonF &poly: alertPolygons)
|
||||
painter->drawPolyline(poly);
|
||||
painter->restore();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue