Skip to content

Commit

Permalink
Deduplicate fieldNameIndex code
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 9, 2016
1 parent f4c5106 commit a859013
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/core/qgsvectordataprovider.cpp
Expand Up @@ -226,14 +226,7 @@ QString QgsVectorDataProvider::capabilitiesString() const

int QgsVectorDataProvider::fieldNameIndex( const QString& fieldName ) const
{
Q_FOREACH ( const QgsField& field, fields() )
{
if ( QString::compare( field.name(), fieldName, Qt::CaseInsensitive ) == 0 )
{
return i;
}
}
return -1;
return fields().fieldNameIndex( fieldName );
}

QMap<QString, int> QgsVectorDataProvider::fieldNameMap() const
Expand Down

0 comments on commit a859013

Please sign in to comment.