Move QgsProxyFeatureSink methods to header

To allow better compiler optimisation
This commit is contained in:
Nyall Dawson 2017-05-03 19:49:31 +10:00
parent 96ad51138b
commit e40cb0716c
3 changed files with 3 additions and 21 deletions

View File

@ -74,12 +74,9 @@ class QgsProxyFeatureSink : QgsFeatureSink
Constructs a new QgsProxyFeatureSink which forwards features onto a destination ``sink``. Constructs a new QgsProxyFeatureSink which forwards features onto a destination ``sink``.
%End %End
virtual bool addFeature( QgsFeature &feature ); virtual bool addFeature( QgsFeature &feature );
virtual bool addFeatures( QgsFeatureList &features ); virtual bool addFeatures( QgsFeatureList &features );
virtual bool addFeatures( QgsFeatureIterator &iterator ); virtual bool addFeatures( QgsFeatureIterator &iterator );
QgsFeatureSink *destinationSink(); QgsFeatureSink *destinationSink();
%Docstring %Docstring
Returns the destination QgsFeatureSink which the proxy will forward features to. Returns the destination QgsFeatureSink which the proxy will forward features to.

View File

@ -43,18 +43,3 @@ bool QgsFeatureSink::addFeatures( QgsFeatureIterator &iterator )
QgsProxyFeatureSink::QgsProxyFeatureSink( QgsFeatureSink *sink ) QgsProxyFeatureSink::QgsProxyFeatureSink( QgsFeatureSink *sink )
: mSink( 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 );
}

View File

@ -80,9 +80,9 @@ class CORE_EXPORT QgsProxyFeatureSink : public QgsFeatureSink
* Constructs a new QgsProxyFeatureSink which forwards features onto a destination \a sink. * Constructs a new QgsProxyFeatureSink which forwards features onto a destination \a sink.
*/ */
QgsProxyFeatureSink( QgsFeatureSink *sink ); QgsProxyFeatureSink( QgsFeatureSink *sink );
bool addFeature( QgsFeature &feature ) override; bool addFeature( QgsFeature &feature ) override { return mSink->addFeature( feature ); }
bool addFeatures( QgsFeatureList &features ) override; bool addFeatures( QgsFeatureList &features ) override { return mSink->addFeatures( features ); }
bool addFeatures( QgsFeatureIterator &iterator ) override; bool addFeatures( QgsFeatureIterator &iterator ) override { return mSink->addFeatures( iterator ); }
/** /**
* Returns the destination QgsFeatureSink which the proxy will forward features to. * Returns the destination QgsFeatureSink which the proxy will forward features to.