@@ -396,7 +396,7 @@ bool QgsOgrProvider::setSubsetString( const QString& theSQL, bool updateFeatureC
396
396
{
397
397
QgsCPLErrorHandler handler;
398
398
399
- if ( ogrDataSource == nullptr )
399
+ if ( ! ogrDataSource )
400
400
return false ;
401
401
402
402
if ( theSQL == mSubsetString && mFeaturesCounted >= 0 )
@@ -729,7 +729,7 @@ void QgsOgrProvider::loadFields()
729
729
QgsOgrConnPool::instance ()->invalidateConnections ( dataSourceUri () );
730
730
// the attribute fields need to be read again when the encoding changes
731
731
mAttributeFields .clear ();
732
- if ( ogrLayer == nullptr )
732
+ if ( ! ogrLayer )
733
733
return ;
734
734
735
735
if ( mOgrGeometryTypeFilter != wkbUnknown )
@@ -2828,7 +2828,7 @@ bool QgsOgrProvider::syncToDisc()
2828
2828
2829
2829
void QgsOgrProvider::recalculateFeatureCount ()
2830
2830
{
2831
- if ( ogrLayer == nullptr )
2831
+ if ( ! ogrLayer )
2832
2832
{
2833
2833
mFeaturesCounted = 0 ;
2834
2834
return ;
@@ -3061,7 +3061,7 @@ void QgsOgrProvider::open( OpenMode mode )
3061
3061
3062
3062
ogrLayer = ogrOrigLayer;
3063
3063
}
3064
- if ( ogrLayer != nullptr )
3064
+ if ( ogrLayer )
3065
3065
{
3066
3066
mValid = true ;
3067
3067
mDynamicWriteAccess = true ;
@@ -3133,7 +3133,7 @@ bool QgsOgrProvider::enterUpdateMode()
3133
3133
QgsDebugMsg ( QString ( " Reopening %1 in update mode" ).arg ( dataSourceUri () ) );
3134
3134
close ();
3135
3135
open ( OpenModeForceUpdate );
3136
- if ( ogrDataSource == nullptr || !mWriteAccess )
3136
+ if ( ! ogrDataSource || !mWriteAccess )
3137
3137
{
3138
3138
QgsMessageLog::logMessage ( tr ( " Cannot reopen datasource %1 in update mode" ).arg ( dataSourceUri () ), tr ( " OGR" ) );
3139
3139
pushError ( tr ( " Cannot reopen datasource %1 in update mode" ).arg ( dataSourceUri () ) );
@@ -3166,7 +3166,7 @@ bool QgsOgrProvider::leaveUpdateMode()
3166
3166
QgsDebugMsg ( QString ( " Reopening %1 in read-only mode" ).arg ( dataSourceUri () ) );
3167
3167
close ();
3168
3168
open ( OpenModeForceReadOnly );
3169
- if ( ogrDataSource == nullptr )
3169
+ if ( ! ogrDataSource )
3170
3170
{
3171
3171
QgsMessageLog::logMessage ( tr ( " Cannot reopen datasource %1 in read-only mode" ).arg ( dataSourceUri () ), tr ( " OGR" ) );
3172
3172
pushError ( tr ( " Cannot reopen datasource %1 in read-only mode" ).arg ( dataSourceUri () ) );
0 commit comments