25
25
int spatialite_database_unique_ptr::open ( const QString &path )
26
26
{
27
27
#if defined(SPATIALITE_HAS_INIT_EX)
28
- get_deleter ().mSpatialiteContext = spatialite_alloc_connection ();
28
+ auto &deleter = get_deleter ();
29
+ deleter.mSpatialiteContext = spatialite_alloc_connection ();
29
30
#else
30
31
spatialite_init ( 0 );
31
32
#endif
@@ -36,7 +37,7 @@ int spatialite_database_unique_ptr::open( const QString &path )
36
37
37
38
#if defined(SPATIALITE_HAS_INIT_EX)
38
39
if ( result == SQLITE_OK )
39
- spatialite_init_ex ( database, get_deleter () .mSpatialiteContext , 0 );
40
+ spatialite_init_ex ( database, deleter .mSpatialiteContext , 0 );
40
41
#endif
41
42
42
43
return result;
@@ -45,7 +46,8 @@ int spatialite_database_unique_ptr::open( const QString &path )
45
46
int spatialite_database_unique_ptr::open_v2 ( const QString &path, int flags, const char *zVfs )
46
47
{
47
48
#if defined(SPATIALITE_HAS_INIT_EX)
48
- get_deleter ().mSpatialiteContext = spatialite_alloc_connection ();
49
+ auto &deleter = get_deleter ();
50
+ deleter.mSpatialiteContext = spatialite_alloc_connection ();
49
51
#else
50
52
spatialite_init ( 0 );
51
53
#endif
@@ -56,7 +58,7 @@ int spatialite_database_unique_ptr::open_v2( const QString &path, int flags, con
56
58
57
59
#if defined(SPATIALITE_HAS_INIT_EX)
58
60
if ( result == SQLITE_OK )
59
- spatialite_init_ex ( database, get_deleter () .mSpatialiteContext , 0 );
61
+ spatialite_init_ex ( database, deleter .mSpatialiteContext , 0 );
60
62
#endif
61
63
62
64
return result;
@@ -80,7 +82,6 @@ sqlite3_statement_unique_ptr spatialite_database_unique_ptr::prepare( const QStr
80
82
81
83
void QgsSpatialiteCloser::operator ()( sqlite3 *handle )
82
84
{
83
-
84
85
#if defined(SPATIALITE_HAS_INIT_EX)
85
86
spatialite_cleanup_ex ( mSpatialiteContext );
86
87
mSpatialiteContext = nullptr ;
0 commit comments