diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-06 20:38:38 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-08 19:58:35 +0100 |
| commit | 60d3df673ca224107eb63e459073fc11ab5f4f16 (patch) | |
| tree | 52c871c17f0c98c90ce6415cdb79dc1e73c14f4d /src/projections/cea.cpp | |
| parent | 38ec5e662a74d40e02e38dc5dca553c3ecb04356 (diff) | |
| download | PROJ-60d3df673ca224107eb63e459073fc11ab5f4f16.tar.gz PROJ-60d3df673ca224107eb63e459073fc11ab5f4f16.zip | |
src/projections/: remove assignments in expression and multiple statements per line
Should hopefully result in no change in results, and hopefully more
readable code...
Diffstat (limited to 'src/projections/cea.cpp')
| -rw-r--r-- | src/projections/cea.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/projections/cea.cpp b/src/projections/cea.cpp index a7e5fd04..7e6d3212 100644 --- a/src/projections/cea.cpp +++ b/src/projections/cea.cpp @@ -43,9 +43,10 @@ static PJ_LP cea_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse static PJ_LP cea_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse */ PJ_LP lp = {0.0,0.0}; - double t; - if ((t = fabs(xy.y *= P->k0)) - EPS <= 1.) { + xy.y *= P->k0; + const double t = fabs(xy.y); + if (t - EPS <= 1.) { if (t >= 1.) lp.phi = xy.y < 0. ? -M_HALFPI : M_HALFPI; else @@ -88,7 +89,8 @@ PJ *PROJECTION(cea) { t = sin(t); P->k0 /= sqrt(1. - P->es * t * t); P->e = sqrt(P->es); - if (!(Q->apa = pj_authset(P->es))) + Q->apa = pj_authset(P->es); + if (!(Q->apa)) return pj_default_destructor(P, ENOMEM); Q->qp = pj_qsfn(1., P->e, P->one_es); |
