Skip to content

Commit

Permalink
More loop references
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 13, 2021
1 parent 52950b8 commit b2933c6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsalignrasterdialog.cpp
Expand Up @@ -141,7 +141,7 @@ void QgsAlignRasterDialog::populateLayersView()
QStandardItemModel *model = new QStandardItemModel();
int i = 0;
const auto constRasters = mAlign->rasters();
for ( const QgsAlignRaster::Item item : constRasters )
for ( const QgsAlignRaster::Item &item : constRasters )
{
QString layerName = _rasterLayerName( item.inputFilename );

Expand Down
3 changes: 2 additions & 1 deletion src/server/services/wcs/qgswcsutils.cpp
Expand Up @@ -269,7 +269,8 @@ namespace QgsWcs
QUrl url = request.originalUrl();
QUrlQuery q( url );

for ( const auto param : q.queryItems() )
const QList<QPair<QString, QString> > queryItems = q.queryItems();
for ( const QPair<QString, QString> &param : queryItems )
{
if ( sFilter.contains( param.first.toUpper() ) )
q.removeAllQueryItems( param.first );
Expand Down
3 changes: 2 additions & 1 deletion src/server/services/wfs/qgswfsparameters.cpp
Expand Up @@ -204,7 +204,8 @@ namespace QgsWfs
void QgsWfsParameters::dump() const
{
log( "WFS Request parameters:" );
for ( const auto parameter : mWfsParameters.toStdMap() )
const auto map = mWfsParameters.toStdMap();
for ( const auto &parameter : map )
{
const QString value = parameter.second.toString();

Expand Down
3 changes: 2 additions & 1 deletion src/server/services/wms/qgswmsutils.cpp
Expand Up @@ -52,7 +52,8 @@ namespace QgsWms
href = request.originalUrl();
QUrlQuery q( href );

for ( const auto param : q.queryItems() )
const QList<QPair<QString, QString> > queryItems = q.queryItems();
for ( const QPair<QString, QString> &param : queryItems )
{
if ( sFilter.contains( param.first.toUpper() ) )
q.removeAllQueryItems( param.first );
Expand Down
3 changes: 2 additions & 1 deletion src/server/services/wmts/qgswmtsparameters.cpp
Expand Up @@ -154,7 +154,8 @@ namespace QgsWmts
void QgsWmtsParameters::dump() const
{
log( "WMTS Request parameters:" );
for ( const auto parameter : mWmtsParameters.toStdMap() )
const auto map = mWmtsParameters.toStdMap();
for ( const auto &parameter : map )
{
const QString value = parameter.second.toString();

Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsziputils.cpp
Expand Up @@ -162,7 +162,7 @@ void TestQgsZipUtils::genericTest( QString zipName, int expectedEntries, bool in
QCOMPARE( files.count(), filesFromResultDir.count() );

// Test if specific files are included in the root folder
for ( const QString fileName : testFileNames )
for ( const QString &fileName : testFileNames )
{
QVERIFY( filesFromResultDir.contains( unzipDirPath + fileName ) );
}
Expand Down

0 comments on commit b2933c6

Please sign in to comment.