Skip to content

Commit e40cb07

Browse files
committed
Move QgsProxyFeatureSink methods to header
To allow better compiler optimisation
1 parent 96ad511 commit e40cb07

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

python/core/qgsfeaturesink.sip

-3
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,9 @@ class QgsProxyFeatureSink : QgsFeatureSink
7474
Constructs a new QgsProxyFeatureSink which forwards features onto a destination ``sink``.
7575
%End
7676
virtual bool addFeature( QgsFeature &feature );
77-
7877
virtual bool addFeatures( QgsFeatureList &features );
79-
8078
virtual bool addFeatures( QgsFeatureIterator &iterator );
8179

82-
8380
QgsFeatureSink *destinationSink();
8481
%Docstring
8582
Returns the destination QgsFeatureSink which the proxy will forward features to.

src/core/qgsfeaturesink.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,3 @@ bool QgsFeatureSink::addFeatures( QgsFeatureIterator &iterator )
4343
QgsProxyFeatureSink::QgsProxyFeatureSink( QgsFeatureSink *sink )
4444
: mSink( sink )
4545
{}
46-
47-
bool QgsProxyFeatureSink::addFeature( QgsFeature &feature )
48-
{
49-
return mSink->addFeature( feature );
50-
}
51-
52-
bool QgsProxyFeatureSink::addFeatures( QgsFeatureList &features )
53-
{
54-
return mSink->addFeatures( features );
55-
}
56-
57-
bool QgsProxyFeatureSink::addFeatures( QgsFeatureIterator &iterator )
58-
{
59-
return mSink->addFeatures( iterator );
60-
}

src/core/qgsfeaturesink.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ class CORE_EXPORT QgsProxyFeatureSink : public QgsFeatureSink
8080
* Constructs a new QgsProxyFeatureSink which forwards features onto a destination \a sink.
8181
*/
8282
QgsProxyFeatureSink( QgsFeatureSink *sink );
83-
bool addFeature( QgsFeature &feature ) override;
84-
bool addFeatures( QgsFeatureList &features ) override;
85-
bool addFeatures( QgsFeatureIterator &iterator ) override;
83+
bool addFeature( QgsFeature &feature ) override { return mSink->addFeature( feature ); }
84+
bool addFeatures( QgsFeatureList &features ) override { return mSink->addFeatures( features ); }
85+
bool addFeatures( QgsFeatureIterator &iterator ) override { return mSink->addFeatures( iterator ); }
8686

8787
/**
8888
* Returns the destination QgsFeatureSink which the proxy will forward features to.

0 commit comments

Comments
 (0)