Skip to content

Commit

Permalink
Strip nullptr inequality check
Browse files Browse the repository at this point in the history
szekerest authored and nyalldawson committed Jun 15, 2019
1 parent 70ae636 commit 58f8e76
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlfeatureiterator.cpp
Original file line number Diff line number Diff line change
@@ -407,7 +407,7 @@ bool QgsMssqlFeatureIterator::fetchFeature( QgsFeature &feature )
if ( !ar.isEmpty() )
{
std::unique_ptr<QgsAbstractGeometry> geom = mParser.parseSqlGeometry( reinterpret_cast< unsigned char * >( ar.data() ), ar.size() );
if ( geom != nullptr )
if ( geom )
{
feature.setGeometry( QgsGeometry( std::move( geom ) ) );
}
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Original file line number Diff line number Diff line change
@@ -772,7 +772,7 @@ void QgsMssqlProvider::UpdateStatistics( bool estimate ) const
{
QByteArray ar = query.value( 0 ).toByteArray();
std::unique_ptr<QgsAbstractGeometry> geom = mParser.parseSqlGeometry( reinterpret_cast< unsigned char * >( ar.data() ), ar.size() );
if ( geom != nullptr )
if ( geom )
{
QgsRectangle rect = geom->boundingBox();

0 comments on commit 58f8e76

Please sign in to comment.