Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move QgsProxyFeatureSink methods to header
To allow better compiler optimisation
  • Loading branch information
nyalldawson committed May 3, 2017
1 parent 96ad511 commit e40cb07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
3 changes: 0 additions & 3 deletions python/core/qgsfeaturesink.sip
Expand Up @@ -74,12 +74,9 @@ class QgsProxyFeatureSink : QgsFeatureSink
Constructs a new QgsProxyFeatureSink which forwards features onto a destination ``sink``.
%End
virtual bool addFeature( QgsFeature &feature );

virtual bool addFeatures( QgsFeatureList &features );

virtual bool addFeatures( QgsFeatureIterator &iterator );


QgsFeatureSink *destinationSink();
%Docstring
Returns the destination QgsFeatureSink which the proxy will forward features to.
Expand Down
15 changes: 0 additions & 15 deletions src/core/qgsfeaturesink.cpp
Expand Up @@ -43,18 +43,3 @@ bool QgsFeatureSink::addFeatures( QgsFeatureIterator &iterator )
QgsProxyFeatureSink::QgsProxyFeatureSink( QgsFeatureSink *sink )
: mSink( sink )
{}

bool QgsProxyFeatureSink::addFeature( QgsFeature &feature )
{
return mSink->addFeature( feature );
}

bool QgsProxyFeatureSink::addFeatures( QgsFeatureList &features )
{
return mSink->addFeatures( features );
}

bool QgsProxyFeatureSink::addFeatures( QgsFeatureIterator &iterator )
{
return mSink->addFeatures( iterator );
}
6 changes: 3 additions & 3 deletions src/core/qgsfeaturesink.h
Expand Up @@ -80,9 +80,9 @@ class CORE_EXPORT QgsProxyFeatureSink : public QgsFeatureSink
* Constructs a new QgsProxyFeatureSink which forwards features onto a destination \a sink.
*/
QgsProxyFeatureSink( QgsFeatureSink *sink );
bool addFeature( QgsFeature &feature ) override;
bool addFeatures( QgsFeatureList &features ) override;
bool addFeatures( QgsFeatureIterator &iterator ) override;
bool addFeature( QgsFeature &feature ) override { return mSink->addFeature( feature ); }
bool addFeatures( QgsFeatureList &features ) override { return mSink->addFeatures( features ); }
bool addFeatures( QgsFeatureIterator &iterator ) override { return mSink->addFeatures( iterator ); }

/**
* Returns the destination QgsFeatureSink which the proxy will forward features to.
Expand Down

0 comments on commit e40cb07

Please sign in to comment.