Skip to content

Commit

Permalink
providers/ogr/qgsogrproviderutils.*: Fix for llvm13
Browse files Browse the repository at this point in the history
Since llvm13, the build is broken with:
/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ogr/qgsogrproviderutils.cpp:2595:34: error: no matching constructor for initialization of 'QgsOgrDatasetSharedPtr' (aka 'shared_ptr<QgsOgrDataset>')
      QgsOgrDatasetSharedPtr dsRet = QgsOgrDatasetSharedPtr( new QgsOgrDataset(), QgsOgrProviderUtils::releaseDataset );
  • Loading branch information
DimitryAndric authored and rhurlin committed Dec 8, 2021
1 parent be56138 commit 567cd59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/core/providers/ogr/qgsogrproviderutils.cpp
Expand Up @@ -2337,15 +2337,14 @@ void QgsOgrProviderUtils::release( QgsOgrLayer *&layer )
}


void QgsOgrProviderUtils::releaseDataset( QgsOgrDataset *&ds )
void QgsOgrProviderUtils::releaseDataset( QgsOgrDataset *ds )
{
if ( !ds )
return;

QMutexLocker locker( sGlobalMutex() );
releaseInternal( ds->mIdent, ds->mDs, true );
delete ds;
ds = nullptr;
}

bool QgsOgrProviderUtils::canDriverShareSameDatasetAmongLayers( const QString &driverName )
Expand Down
2 changes: 1 addition & 1 deletion src/core/providers/ogr/qgsogrproviderutils.h
Expand Up @@ -216,7 +216,7 @@ class CORE_EXPORT QgsOgrProviderUtils
static void release( QgsOgrLayer *&layer );

//! Release a QgsOgrDataset*
static void releaseDataset( QgsOgrDataset *&ds );
static void releaseDataset( QgsOgrDataset *ds );

//! Make sure that the existing pool of opened datasets on dsName is not accessible for new getLayer() attempts
static void invalidateCachedDatasets( const QString &dsName );
Expand Down

0 comments on commit 567cd59

Please sign in to comment.