Skip to content

Commit

Permalink
reserve space in feature list for performance (#8322)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 25, 2018
1 parent d1423de commit 6a9cff3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -3024,6 +3024,7 @@ const QgsFeatureIds &QgsVectorLayer::selectedFeatureIds() const
QgsFeatureList QgsVectorLayer::selectedFeatures() const
{
QgsFeatureList features;
features.reserve( mSelectedFeatureIds.count() );
QgsFeature f;

if ( mSelectedFeatureIds.count() <= 8 )
Expand Down

0 comments on commit 6a9cff3

Please sign in to comment.