Skip to content

Commit

Permalink
Strip nullptr inequality check
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest authored and nyalldawson committed Jun 15, 2019
1 parent 70ae636 commit 58f8e76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlfeatureiterator.cpp
Expand Up @@ -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 ) ) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Expand Up @@ -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();

Expand Down

0 comments on commit 58f8e76

Please sign in to comment.