Skip to content

Commit

Permalink
Add unique_ptr in nodePropertyIsNullFromOgcFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Sep 13, 2018
1 parent 5ccb167 commit 694af1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsogcutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3417,12 +3417,12 @@ QgsExpressionNodeBinaryOperator *QgsOgcUtilsExpressionFromFilter::nodePropertyIs
}

QDomElement operandElem = element.firstChildElement();
QgsExpressionNode *opLeft = nodeFromOgcFilter( operandElem );
std::unique_ptr<QgsExpressionNode> opLeft( nodeFromOgcFilter( operandElem ) );
if ( !opLeft )
return nullptr;

QgsExpressionNode *opRight = new QgsExpressionNodeLiteral( QVariant() );
return new QgsExpressionNodeBinaryOperator( QgsExpressionNodeBinaryOperator::boIs, opLeft, opRight );
std::unique_ptr<QgsExpressionNode> opRight( new QgsExpressionNodeLiteral( QVariant() ) );
return new QgsExpressionNodeBinaryOperator( QgsExpressionNodeBinaryOperator::boIs, opLeft.release(), opRight.release() );
}

QgsExpressionNodeFunction *QgsOgcUtilsExpressionFromFilter::nodeFunctionFromOgcFilter( const QDomElement &element )
Expand Down

0 comments on commit 694af1c

Please sign in to comment.