aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-06-09 19:58:12 +0200
committerGitHub <noreply@github.com>2021-06-09 19:58:12 +0200
commit5436e8aa46f7fb6dd6c9853e5da7222d8e6607e1 (patch)
tree55a7ac8146c327d54a9423db8a66a8dbbf54709c /include
parentfae861c75adbc598393245f34ad8871a9aaecd44 (diff)
parent61e25ec859a34e68fa8c2dc99f951f3e970875df (diff)
downloadPROJ-5436e8aa46f7fb6dd6c9853e5da7222d8e6607e1.tar.gz
PROJ-5436e8aa46f7fb6dd6c9853e5da7222d8e6607e1.zip
Merge pull request #2738 from rouault/share_sqlite_handle
Share SQLite database handle among all contexts
Diffstat (limited to 'include')
-rw-r--r--include/proj/internal/io_internal.hpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp
index ccc3787e..e0426b59 100644
--- a/include/proj/internal/io_internal.hpp
+++ b/include/proj/internal/io_internal.hpp
@@ -173,7 +173,6 @@ struct projCppContext {
PJ_CONTEXT *ctx_ = nullptr;
std::string dbPath_{};
std::vector<std::string> auxDbPaths_{};
- bool autoCloseDb_ = false;
projCppContext(const projCppContext &) = delete;
projCppContext &operator=(const projCppContext &) = delete;
@@ -201,18 +200,9 @@ struct projCppContext {
return auxDbPaths_;
}
- void setAutoCloseDb(bool autoClose) {
- autoCloseDb_ = autoClose;
- autoCloseDbIfNeeded();
- }
- inline bool getAutoCloseDb() const { return autoCloseDb_; }
-
- // cppcheck-suppress functionStatic
- void closeDb();
-
- void autoCloseDbIfNeeded();
-
NS_PROJ::io::DatabaseContextNNPtr getDatabaseContext();
+
+ void closeDb() { databaseContext_ = nullptr; }
};
//! @endcond