Skip to content
Permalink
Browse files

Make use of implicitly shared QgsExpression

  • Loading branch information
m-kuhn committed Dec 15, 2015
1 parent 4f999c8 commit 2596315dac597c9ab251ed8100d378be70dbf10d
@@ -53,7 +53,7 @@ QgsFeatureRequest::QgsFeatureRequest( const QgsRectangle& rect )
QgsFeatureRequest::QgsFeatureRequest( const QgsExpression& expr, const QgsExpressionContext &context )
: mFilter( FilterExpression )
, mFilterFid( -1 )
, mFilterExpression( new QgsExpression( expr.expression() ) )
, mFilterExpression( new QgsExpression( expr ) )
, mExpressionContext( context )
, mFlags( nullptr )
, mLimit( -1 )
@@ -74,7 +74,7 @@ QgsFeatureRequest& QgsFeatureRequest::operator=( const QgsFeatureRequest & rh )
mFilterFids = rh.mFilterFids;
if ( rh.mFilterExpression )
{
mFilterExpression = new QgsExpression( rh.mFilterExpression->expression() );
mFilterExpression = new QgsExpression( *rh.mFilterExpression );
}
else
{
@@ -470,7 +470,7 @@ void QgsDelimitedTextFeatureIterator::fetchAttribute( QgsFeature& feature, int f

QgsDelimitedTextFeatureSource::QgsDelimitedTextFeatureSource( const QgsDelimitedTextProvider* p )
: mGeomRep( p->mGeomRep )
, mSubsetExpression( p->mSubsetExpression ? new QgsExpression( p->mSubsetExpression->expression() ) : nullptr )
, mSubsetExpression( p->mSubsetExpression ? new QgsExpression( *p->mSubsetExpression ) : nullptr )
, mExtent( p->mExtent )
, mUseSpatialIndex( p->mUseSpatialIndex )
, mSpatialIndex( p->mSpatialIndex ? new QgsSpatialIndex( *p->mSpatialIndex ) : nullptr )

0 comments on commit 2596315

Please sign in to comment.
You can’t perform that action at this time.