Commit 69fdb9bc authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Avoid repeated function calls inside loop

parent de120874
......@@ -133,9 +133,9 @@ bool GeometryLayer::render( GeoPainter *painter, ViewportParams *viewport,
QList<LayerItem> defaultLayer;
int paintedItems = 0;
QHash<QString, QList<GeoGraphicsItem*> > paintedFragments;
foreach( GeoGraphicsItem* item, items )
{
if ( item->latLonAltBox().intersects( viewport->viewLatLonAltBox() ) ) {
auto const viewLatLonAltBox = viewport->viewLatLonAltBox();
foreach( GeoGraphicsItem* item, items ) {
if ( item->latLonAltBox().intersects(viewLatLonAltBox) ) {
QStringList paintLayers = item->paintLayers();
if (paintLayers.isEmpty()) {
mDebug() << item << " provides no paint layers, so I force one onto it.";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment