@@ -134,8 +134,7 @@ bool QgsCentroidAlgorithm::processAlgorithm( QgsProcessingContext &, QgsProcessi
134
134
feedback->setProgress ( current * step );
135
135
current++;
136
136
}
137
- mSource .reset ();
138
- mSink .reset ();
137
+ mSink ->flushBuffer ();
139
138
return true ;
140
139
}
141
140
@@ -268,8 +267,7 @@ bool QgsBufferAlgorithm::processAlgorithm( QgsProcessingContext &, QgsProcessing
268
267
mSink ->addFeature ( f, QgsFeatureSink::FastInsert );
269
268
}
270
269
271
- mSource .reset ();
272
- mSink .reset ();
270
+ mSink ->flushBuffer ();
273
271
return true ;
274
272
}
275
273
@@ -427,9 +425,7 @@ bool QgsDissolveAlgorithm::processAlgorithm( QgsProcessingContext &, QgsProcessi
427
425
}
428
426
}
429
427
430
- mSource .reset ();
431
- mSink .reset ();
432
-
428
+ mSink ->flushBuffer ();
433
429
return true ;
434
430
}
435
431
@@ -592,9 +588,7 @@ bool QgsClipAlgorithm::processAlgorithm( QgsProcessingContext &, QgsProcessingFe
592
588
feedback->setProgress ( 100.0 * static_cast < double >( i ) / clipGeoms.length () );
593
589
}
594
590
}
595
- mFeatureSource .reset ();
596
- mMaskSource .reset ();
597
- mSink .reset ();
591
+ mSink ->flushBuffer ();
598
592
return true ;
599
593
}
600
594
@@ -751,8 +745,7 @@ bool QgsSubdivideAlgorithm::processAlgorithm( QgsProcessingContext &, QgsProcess
751
745
feedback->setProgress ( current * step );
752
746
current++;
753
747
}
754
- mSource .reset ();
755
- mSink .reset ();
748
+ mSink ->flushBuffer ();
756
749
return true ;
757
750
}
758
751
@@ -844,9 +837,7 @@ bool QgsMultipartToSinglepartAlgorithm::processAlgorithm( QgsProcessingContext &
844
837
feedback->setProgress ( current * step );
845
838
current++;
846
839
}
847
- mSource .reset ();
848
- mSink .reset ();
849
-
840
+ mSink ->flushBuffer ();
850
841
return true ;
851
842
}
852
843
@@ -968,10 +959,10 @@ bool QgsExtractByExpressionAlgorithm::processAlgorithm( QgsProcessingContext &,
968
959
current++;
969
960
}
970
961
}
971
-
972
- mSource . reset ();
973
- mMatchingSink . reset ();
974
- mNonMatchingSink . reset ();
962
+ if ( mMatchingSink )
963
+ mMatchingSink -> flushBuffer ();
964
+ if ( mNonMatchingSink )
965
+ mNonMatchingSink -> flushBuffer ();
975
966
return true ;
976
967
}
977
968
@@ -1177,9 +1168,10 @@ bool QgsExtractByAttributeAlgorithm::processAlgorithm( QgsProcessingContext &, Q
1177
1168
}
1178
1169
}
1179
1170
1180
- mSource .reset ();
1181
- mMatchingSink .reset ();
1182
- mNonMatchingSink .reset ();
1171
+ if ( mMatchingSink )
1172
+ mMatchingSink ->flushBuffer ();
1173
+ if ( mNonMatchingSink )
1174
+ mNonMatchingSink ->flushBuffer ();
1183
1175
return true ;
1184
1176
}
1185
1177
0 commit comments