Skip to content

Commit

Permalink
Use at() instead of operator [] to avoid detach and save time
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 17, 2014
1 parent 45ebe53 commit cff5b56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/spatialite/qgsspatialitefeatureiterator.cpp
Expand Up @@ -321,13 +321,13 @@ bool QgsSpatiaLiteFeatureIterator::getFeature( sqlite3_stmt *stmt, QgsFeature &f
if ( ic <= mRequest.subsetOfAttributes().size() )
{
int attrIndex = mRequest.subsetOfAttributes()[ic-1];
feature.setAttribute( attrIndex, getFeatureAttribute( stmt, ic, mSource->mFields[attrIndex].type() ) );
feature.setAttribute( attrIndex, getFeatureAttribute( stmt, ic, mSource->mFields.at( attrIndex ).type() ) );
}
}
else
{
int attrIndex = ic - 1;
feature.setAttribute( attrIndex, getFeatureAttribute( stmt, ic, mSource->mFields[attrIndex].type() ) );
feature.setAttribute( attrIndex, getFeatureAttribute( stmt, ic, mSource->mFields.at( attrIndex ).type() ) );
}
}
}
Expand Down

0 comments on commit cff5b56

Please sign in to comment.