Skip to content

Commit

Permalink
Q_FOREACH use to iterate over joins info
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jul 2, 2017
1 parent 3e2d9c5 commit e52414e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/core/qgsvectorlayerjoinbuffer.cpp
Expand Up @@ -398,15 +398,13 @@ QList<const QgsVectorLayerJoinInfo *> QgsVectorLayerJoinBuffer::joinsWhereFieldI
{
QList<const QgsVectorLayerJoinInfo *> infos;

for ( int i = 0; i < mVectorJoins.count(); i++ )
Q_FOREACH ( const QgsVectorLayerJoinInfo &info, mVectorJoins )
{
const QgsVectorLayerJoinInfo *info = &( mVectorJoins[i] );

if ( infos.contains( info ) )
if ( infos.contains( &info ) )
continue;

if ( info->targetFieldName() == field.name() )
infos.append( info );
if ( info.targetFieldName() == field.name() )
infos.append( &info );
}

return infos;
Expand Down

0 comments on commit e52414e

Please sign in to comment.