aboutsummaryrefslogtreecommitdiff
path: root/src/ctx.cpp
diff options
context:
space:
mode:
authorAlan D. Snow <alansnow21@gmail.com>2020-08-20 10:48:40 -0500
committerGitHub <noreply@github.com>2020-08-20 17:48:40 +0200
commitbc1dcf2cd581a5c144a9c35028bd33aa9191882f (patch)
treefede8e9f75fe796ab51c624ade530938bd28a6e2 /src/ctx.cpp
parent2b3475c853b37b1485e92ef8cf78b02fb0db6142 (diff)
downloadPROJ-bc1dcf2cd581a5c144a9c35028bd33aa9191882f.tar.gz
PROJ-bc1dcf2cd581a5c144a9c35028bd33aa9191882f.zip
projCtx_t: Copy ini file settings, proj4_init_rules, etc.. when initializing context from global (#2331)
Diffstat (limited to 'src/ctx.cpp')
-rw-r--r--src/ctx.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp
index c2b30644..5575d3aa 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -167,22 +167,30 @@ void projCtx_t::set_ca_bundle_path(const std::string& ca_bundle_path_in)
/* projCtx_t(const projCtx_t& other) */
/************************************************************************/
-projCtx_t::projCtx_t(const projCtx_t& other)
+projCtx_t::projCtx_t(const projCtx_t& other) :
+ debug_level(other.debug_level),
+ logger(other.logger),
+ logger_app_data(other.logger_app_data),
+ fileapi_legacy(other.fileapi_legacy),
+ cpp_context(other.cpp_context ? other.cpp_context->clone(this) : nullptr),
+ use_proj4_init_rules(other.use_proj4_init_rules),
+ epsg_file_exists(other.epsg_file_exists),
+ ca_bundle_path(other.ca_bundle_path),
+ env_var_proj_lib(other.env_var_proj_lib),
+ file_finder_legacy(other.file_finder_legacy),
+ file_finder(other.file_finder),
+ file_finder_user_data(other.file_finder_user_data),
+ custom_sqlite3_vfs_name(other.custom_sqlite3_vfs_name),
+ user_writable_directory(other.user_writable_directory),
+ // BEGIN ini file settings
+ iniFileLoaded(other.iniFileLoaded),
+ endpoint(other.endpoint),
+ networking(other.networking),
+ gridChunkCache(other.gridChunkCache),
+ defaultTmercAlgo(other.defaultTmercAlgo)
+ // END ini file settings
{
- debug_level = other.debug_level;
- logger = other.logger;
- logger_app_data = other.logger_app_data;
- fileapi_legacy = other.fileapi_legacy;
- epsg_file_exists = other.epsg_file_exists;
set_search_paths(other.search_paths);
- file_finder = other.file_finder;
- file_finder_legacy = other.file_finder_legacy;
- file_finder_user_data = other.file_finder_user_data;
- networking = other.networking;
- ca_bundle_path = other.ca_bundle_path;
- if (other.cpp_context != nullptr) {
- cpp_context = other.cpp_context->clone(this);
- }
}
/************************************************************************/