@@ -395,7 +395,7 @@ bool QgsOgrProvider::setSubsetString( const QString& theSQL, bool updateFeatureC
395
395
{
396
396
QgsCPLErrorHandler handler;
397
397
398
- if ( ogrDataSource == nullptr )
398
+ if ( ! ogrDataSource )
399
399
return false ;
400
400
401
401
if ( theSQL == mSubsetString && mFeaturesCounted >= 0 )
@@ -695,7 +695,7 @@ void QgsOgrProvider::loadFields()
695
695
QgsOgrConnPool::instance ()->invalidateConnections ( dataSourceUri () );
696
696
// the attribute fields need to be read again when the encoding changes
697
697
mAttributeFields .clear ();
698
- if ( ogrLayer == nullptr )
698
+ if ( ! ogrLayer )
699
699
return ;
700
700
701
701
if ( mOgrGeometryTypeFilter != wkbUnknown )
@@ -2694,7 +2694,7 @@ bool QgsOgrProvider::syncToDisc()
2694
2694
2695
2695
void QgsOgrProvider::recalculateFeatureCount ()
2696
2696
{
2697
- if ( ogrLayer == nullptr )
2697
+ if ( ! ogrLayer )
2698
2698
{
2699
2699
mFeaturesCounted = 0 ;
2700
2700
return ;
@@ -2927,7 +2927,7 @@ void QgsOgrProvider::open( OpenMode mode )
2927
2927
2928
2928
ogrLayer = ogrOrigLayer;
2929
2929
}
2930
- if ( ogrLayer != nullptr )
2930
+ if ( ogrLayer )
2931
2931
{
2932
2932
mValid = true ;
2933
2933
mDynamicWriteAccess = true ;
@@ -2999,7 +2999,7 @@ bool QgsOgrProvider::enterUpdateMode()
2999
2999
QgsDebugMsg ( QString ( " Reopening %1 in update mode" ).arg ( dataSourceUri () ) );
3000
3000
close ();
3001
3001
open ( OpenModeForceUpdate );
3002
- if ( ogrDataSource == nullptr || !mWriteAccess )
3002
+ if ( ! ogrDataSource || !mWriteAccess )
3003
3003
{
3004
3004
QgsMessageLog::logMessage ( tr ( " Cannot reopen datasource %1 in update mode" ).arg ( dataSourceUri () ), tr ( " OGR" ) );
3005
3005
pushError ( tr ( " Cannot reopen datasource %1 in update mode" ).arg ( dataSourceUri () ) );
@@ -3032,7 +3032,7 @@ bool QgsOgrProvider::leaveUpdateMode()
3032
3032
QgsDebugMsg ( QString ( " Reopening %1 in read-only mode" ).arg ( dataSourceUri () ) );
3033
3033
close ();
3034
3034
open ( OpenModeForceReadOnly );
3035
- if ( ogrDataSource == nullptr )
3035
+ if ( ! ogrDataSource )
3036
3036
{
3037
3037
QgsMessageLog::logMessage ( tr ( " Cannot reopen datasource %1 in read-only mode" ).arg ( dataSourceUri () ), tr ( " OGR" ) );
3038
3038
pushError ( tr ( " Cannot reopen datasource %1 in read-only mode" ).arg ( dataSourceUri () ) );
0 commit comments