Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 9, 2025
1 parent 081d12a commit cb98cb0
Show file tree
Hide file tree
Showing 4 changed files with 634 additions and 139 deletions.
18 changes: 8 additions & 10 deletions src/filemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1985,12 +1985,11 @@ void pj_load_ini(PJ_CONTEXT *ctx) {
}

const char *native_ca = getenv("PROJ_NATIVE_CA");
if (native_ca && native_ca[0] != '\0'){
if (native_ca && native_ca[0] != '\0') {
ctx->native_ca = ci_equal(native_ca, "ON") ||
ci_equal(native_ca, "YES") ||
ci_equal(native_ca, "TRUE");
}
else {
ci_equal(native_ca, "YES") ||
ci_equal(native_ca, "TRUE");
} else {
native_ca = nullptr;
}

Expand Down Expand Up @@ -2059,11 +2058,10 @@ void pj_load_ini(PJ_CONTEXT *ctx) {
ctx->errorIfBestTransformationNotAvailableDefault =
ci_equal(value, "ON") || ci_equal(value, "YES") ||
ci_equal(value, "TRUE");
}
else if (native_ca == nullptr && key == "native_ca"){
ctx->native_ca =
ci_equal(value, "ON") || ci_equal(value, "YES") ||
ci_equal(value, "TRUE");
} else if (native_ca == nullptr && key == "native_ca") {
ctx->native_ca = ci_equal(value, "ON") ||
ci_equal(value, "YES") ||
ci_equal(value, "TRUE");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/networkfilemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ CurlFileHandle::CurlFileHandle(PJ_CONTEXT *ctx, const char *url, CURL *handle)
CHECK_RET(ctx, curl_easy_setopt(handle, CURLOPT_SSL_OPTIONS, ssl_options));
#else
#if CURL_AT_LEAST_VERSION(7, 71, 0)
if (pj_context_get_native_ca(ctx)){
if (pj_context_get_native_ca(ctx)) {
CHECK_RET(ctx, curl_easy_setopt(handle, CURLOPT_SSL_OPTIONS,
(long)CURLSSLOPT_NATIVE_CA));
}
Expand Down
2 changes: 1 addition & 1 deletion src/proj_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ struct pj_ctx {
std::string endpoint{};
projNetworkCallbacksAndData networking{};
std::string ca_bundle_path{};
bool native_ca=false;
bool native_ca = false;
projGridChunkCache gridChunkCache{};
TMercAlgo defaultTmercAlgo =
TMercAlgo::PODER_ENGSAGER; // can be overridden by content of proj.ini
Expand Down
Loading

0 comments on commit cb98cb0

Please sign in to comment.