summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-04-08 00:14:42 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-04-11 15:39:21 +0000
commitd1dab7bf15f905b356f85249bdc57a9aae9c931b (patch)
tree7e1e68497a55dd06ed3889e61f2c56fa3c0ce81a
parent892bd9301dadf4016705daa4812c5c9d0193fb92 (diff)
downloadqtlocation-d1dab7bf15f905b356f85249bdc57a9aae9c931b.tar.gz
Replace foreach with ranged for loops in QGeoTiledMapScene
Change-Id: I7a82c0d63f35d1cfd264801e58089408254757c8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/location/maps/qgeotiledmapscene.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/location/maps/qgeotiledmapscene.cpp b/src/location/maps/qgeotiledmapscene.cpp
index 2e532091..d6e74990 100644
--- a/src/location/maps/qgeotiledmapscene.cpp
+++ b/src/location/maps/qgeotiledmapscene.cpp
@@ -577,7 +577,7 @@ void QGeoTiledMapRootNode::updateTiles(QGeoTiledMapTileContainerNode *root,
QSet<QGeoTileSpec> toRemove = tilesInSG - d->m_visibleTiles;
QSet<QGeoTileSpec> toAdd = d->m_visibleTiles - tilesInSG;
- foreach (const QGeoTileSpec &s, toRemove)
+ for (const QGeoTileSpec &s : toRemove)
delete root->tiles.take(s);
bool straight = !d->isTiltedOrRotated();
bool overzooming;
@@ -611,7 +611,7 @@ void QGeoTiledMapRootNode::updateTiles(QGeoTiledMapTileContainerNode *root,
}
}
- foreach (const QGeoTileSpec &s, toAdd) {
+ for (const QGeoTileSpec &s : toAdd) {
QGeoTileTexture *tileTexture = d->m_textures.value(s).data();
if (!tileTexture || tileTexture->image.isNull())
continue;
@@ -660,13 +660,13 @@ QSGNode *QGeoTiledMapScene::updateSceneGraph(QSGNode *oldNode, QQuickWindow *win
mapRoot->root->setMatrix(itemSpaceMatrix);
if (d->m_dropTextures) {
- foreach (const QGeoTileSpec &s, mapRoot->tiles->tiles.keys())
+ for (const QGeoTileSpec &s : mapRoot->tiles->tiles.keys())
delete mapRoot->tiles->tiles.take(s);
- foreach (const QGeoTileSpec &s, mapRoot->wrapLeft->tiles.keys())
+ for (const QGeoTileSpec &s : mapRoot->wrapLeft->tiles.keys())
delete mapRoot->wrapLeft->tiles.take(s);
- foreach (const QGeoTileSpec &s, mapRoot->wrapRight->tiles.keys())
+ for (const QGeoTileSpec &s : mapRoot->wrapRight->tiles.keys())
delete mapRoot->wrapRight->tiles.take(s);
- foreach (const QGeoTileSpec &spec, mapRoot->textures.keys())
+ for (const QGeoTileSpec &spec : mapRoot->textures.keys())
mapRoot->textures.take(spec)->deleteLater();
d->m_dropTextures = false;
}
@@ -694,9 +694,9 @@ QSGNode *QGeoTiledMapScene::updateSceneGraph(QSGNode *oldNode, QQuickWindow *win
QSet<QGeoTileSpec> toRemove = textures - d->m_visibleTiles;
QSet<QGeoTileSpec> toAdd = d->m_visibleTiles - textures;
- foreach (const QGeoTileSpec &spec, toRemove)
+ for (const QGeoTileSpec &spec : toRemove)
mapRoot->textures.take(spec)->deleteLater();
- foreach (const QGeoTileSpec &spec, toAdd) {
+ for (const QGeoTileSpec &spec : toAdd) {
QGeoTileTexture *tileTexture = d->m_textures.value(spec).data();
if (!tileTexture || tileTexture->image.isNull())
continue;