From 87318283eedef680356ef272a6af39ac3140d333 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 2 Feb 2020 22:34:56 +0100 Subject: Add projsync utility Fixes #1750 --- src/networkfilemanager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/networkfilemanager.cpp') diff --git a/src/networkfilemanager.cpp b/src/networkfilemanager.cpp index c4cb41d9..d252fd84 100644 --- a/src/networkfilemanager.cpp +++ b/src/networkfilemanager.cpp @@ -193,7 +193,7 @@ class DiskChunkCache { std::unique_ptr vfs_{}; explicit DiskChunkCache(PJ_CONTEXT *ctx, const std::string &path); - + bool initialize(); void commitAndClose(); @@ -552,7 +552,8 @@ bool DiskChunkCache::checkConsistency() { void DiskChunkCache::commitAndClose() { if (hDB_) { - if( sqlite3_exec(hDB_, "COMMIT", nullptr, nullptr, nullptr) != SQLITE_OK ) { + if (sqlite3_exec(hDB_, "COMMIT", nullptr, nullptr, nullptr) != + SQLITE_OK) { pj_log(ctx_, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB_)); } sqlite3_close(hDB_); @@ -562,9 +563,7 @@ void DiskChunkCache::commitAndClose() { // --------------------------------------------------------------------------- -DiskChunkCache::~DiskChunkCache() { - commitAndClose(); -} +DiskChunkCache::~DiskChunkCache() { commitAndClose(); } // --------------------------------------------------------------------------- @@ -1336,7 +1335,8 @@ std::unique_ptr NetworkFile::open(PJ_CONTEXT *ctx, const char *filename) { // --------------------------------------------------------------------------- -std::unique_ptr pj_network_file_open(PJ_CONTEXT* ctx, const char* filename) { +std::unique_ptr pj_network_file_open(PJ_CONTEXT *ctx, + const char *filename) { return NetworkFile::open(ctx, filename); } -- cgit v1.2.3