Skip to content

Commit

Permalink
fix init projCtx_t & gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Aug 20, 2020
1 parent e5b80cd commit 12143d3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 448 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ install_manifest.txt
/data/stlrnc
/data/stpaul
/data/tv_out
/data/for_tests/

# docs
tmp_breathe
Expand All @@ -117,6 +118,7 @@ m4/lt~obsolete.m4
/src/proj_config.h
/src/proj_config.h.in
/src/projinfo
/src/projsync
/src/stamp-h1
/src/test-suite.log

Expand All @@ -130,6 +132,9 @@ m4/lt~obsolete.m4
/test/unit/proj_context_test
/test/unit/test_cpp_api
/test/unit/proj_errno_string_test
/test/unit/test_defmodel
/test/unit/test_network
/tmp_alias/

# jniwrap
jniwrap/out
46 changes: 22 additions & 24 deletions src/ctx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,32 +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)
{
debug_level = other.debug_level;
logger = other.logger;
logger_app_data = other.logger_app_data;
fileapi_legacy = other.fileapi_legacy;
use_proj4_init_rules = other.use_proj4_init_rules;
epsg_file_exists = other.epsg_file_exists;
env_var_proj_lib = other.env_var_proj_lib;
set_search_paths(other.search_paths);
user_writable_directory = other.user_writable_directory;
file_finder = other.file_finder;
file_finder_legacy = other.file_finder_legacy;
file_finder_user_data = other.file_finder_user_data;
custom_sqlite3_vfs_name = other.custom_sqlite3_vfs_name;
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;
gridChunkCache = other.gridChunkCache;
endpoint = other.endpoint;
networking = other.networking;
defaultTmercAlgo = other.defaultTmercAlgo;
iniFileLoaded(other.iniFileLoaded),
endpoint(other.endpoint),
networking(other.networking),
gridChunkCache(other.gridChunkCache),
defaultTmercAlgo(other.defaultTmercAlgo)
// END ini file settings
ca_bundle_path = other.ca_bundle_path;
if (other.cpp_context != nullptr) {
cpp_context = other.cpp_context->clone(this);
}
{
set_search_paths(other.search_paths);
}

/************************************************************************/
Expand Down
9 changes: 5 additions & 4 deletions src/proj_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -735,22 +735,23 @@ struct projCtx_t {
const char* (*file_finder) (PJ_CONTEXT *, const char*, void* user_data) = nullptr;
void* file_finder_user_data = nullptr;

projNetworkCallbacksAndData networking{};
bool defer_grid_opening = false; // set by pj_obj_create()

projFileApiCallbackAndData fileApi{};
std::string custom_sqlite3_vfs_name{};
std::string user_writable_directory{};

// BEGIN ini file settings
bool iniFileLoaded = false;
std::string endpoint{};

std::string user_writable_directory{};
projNetworkCallbacksAndData networking{};
projGridChunkCache gridChunkCache{};
TMercAlgo defaultTmercAlgo = TMercAlgo::PODER_ENGSAGER; // can be overridden by content of proj.ini
// END ini file settings

int projStringParserCreateFromPROJStringRecursionCounter = 0; // to avoid potential infinite recursion in PROJStringParser::createFromPROJString()
int pipelineInitRecursiongCounter = 0; // to avoid potential infinite recursion in pipeline.cpp

TMercAlgo defaultTmercAlgo = TMercAlgo::PODER_ENGSAGER; // can be overridden by content of proj.ini

projCtx_t() = default;
projCtx_t(const projCtx_t&);
Expand Down
210 changes: 0 additions & 210 deletions test/unit/test_defmodel

This file was deleted.

Loading

0 comments on commit 12143d3

Please sign in to comment.