Skip to content

Commit e52414e

Browse files
committedJul 2, 2017
Q_FOREACH use to iterate over joins info
1 parent 3e2d9c5 commit e52414e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
 

‎src/core/qgsvectorlayerjoinbuffer.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,15 +398,13 @@ QList<const QgsVectorLayerJoinInfo *> QgsVectorLayerJoinBuffer::joinsWhereFieldI
398398
{
399399
QList<const QgsVectorLayerJoinInfo *> infos;
400400

401-
for ( int i = 0; i < mVectorJoins.count(); i++ )
401+
Q_FOREACH ( const QgsVectorLayerJoinInfo &info, mVectorJoins )
402402
{
403-
const QgsVectorLayerJoinInfo *info = &( mVectorJoins[i] );
404-
405-
if ( infos.contains( info ) )
403+
if ( infos.contains( &info ) )
406404
continue;
407405

408-
if ( info->targetFieldName() == field.name() )
409-
infos.append( info );
406+
if ( info.targetFieldName() == field.name() )
407+
infos.append( &info );
410408
}
411409

412410
return infos;

0 commit comments

Comments
 (0)
Please sign in to comment.