Skip to content
Permalink
Browse files

[OGR provider] Use constBegin() / constEnd()

  • Loading branch information
rouault committed Oct 31, 2016
1 parent bb9c75b commit 08218de5f414fb0c0b718ed5232b6be133de60e3
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/ogr/qgsogrprovider.cpp
@@ -1350,7 +1350,7 @@ bool QgsOgrProvider::addAttributes( const QList<QgsField> &attributes )

QMap< QString, QgsField > mapFieldNameToOriginalField;

for ( QList<QgsField>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter )
for ( QList<QgsField>::const_iterator iter = attributes.constBegin(); iter != attributes.constEnd(); ++iter )
{
mapFieldNameToOriginalField[ iter->name()] = *iter;

@@ -1418,8 +1418,8 @@ bool QgsOgrProvider::addAttributes( const QList<QgsField> &attributes )
// For example in case of Integer64->Real mapping so that QVariant::LongLong is
// still returned to the caller
// Or if a field width was specified but not strictly enforced by the driver (#15614)
for ( QMap< QString, QgsField >::const_iterator it = mapFieldNameToOriginalField.begin();
it != mapFieldNameToOriginalField.end(); ++it )
for ( QMap< QString, QgsField >::const_iterator it = mapFieldNameToOriginalField.constBegin();
it != mapFieldNameToOriginalField.constEnd(); ++it )
{
int idx = mAttributeFields.lookupField( it.key() );
if ( idx >= 0 )

0 comments on commit 08218de

Please sign in to comment.
You can’t perform that action at this time.