Skip to content

Commit

Permalink
proj_create_crs_to_crs_from_pj(): simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 14, 2024
1 parent 95db9aa commit 1a4e78e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/4D_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2347,18 +2347,15 @@ PJ *proj_create_crs_to_crs_from_pj(PJ_CONTEXT *ctx, const PJ *source_crs,
// PROJ_GRID_AVAILABILITY_DISCARD_OPERATION_IF_MISSING_GRID
// returned 0.
if (op_count == 1 &&
(errorIfBestTransformationNotAvailable ||
warnIfBestTransformationNotAvailable)) {
errorIfBestTransformationNotAvailable) {
if (singleOpIsInstanciable < 0) {
singleOpIsInstanciable =
proj_coordoperation_is_instantiable(ctx, P);
}
if (!singleOpIsInstanciable) {
if (errorIfBestTransformationNotAvailable) {
proj_destroy(P);
proj_context_errno_set(ctx, backup_errno);
return nullptr;
}
proj_destroy(P);
proj_context_errno_set(ctx, backup_errno);
return nullptr;
}
}
}
Expand Down

0 comments on commit 1a4e78e

Please sign in to comment.