aboutsummaryrefslogtreecommitdiff
path: root/src/projections/stere.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-03-18 13:26:22 +0100
committerGitHub <noreply@github.com>2019-03-18 13:26:22 +0100
commit4b99c3b47e76afdeda2425e39ff53fed0f12b679 (patch)
tree6d5e8e549d004eac930ac37f09b85e103a1c3720 /src/projections/stere.cpp
parent06d7f93ad3a862abca8a404de05fd655a8bc797c (diff)
parente1350cac43d5a9854207af3fb318a74be7fcd12f (diff)
downloadPROJ-4b99c3b47e76afdeda2425e39ff53fed0f12b679.tar.gz
PROJ-4b99c3b47e76afdeda2425e39ff53fed0f12b679.zip
Merge pull request #1328 from rouault/cppcheck_fixes
Fix some issues raised by latest cppcheck
Diffstat (limited to 'src/projections/stere.cpp')
-rw-r--r--src/projections/stere.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/projections/stere.cpp b/src/projections/stere.cpp
index 9b24a596..9836f341 100644
--- a/src/projections/stere.cpp
+++ b/src/projections/stere.cpp
@@ -165,7 +165,7 @@ static PJ_LP e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse */
break;
}
- for (i = NITER; i--; phi_l = lp.phi) {
+ for (i = NITER; i--; ) {
sinphi = P->e * sin(phi_l);
lp.phi = 2. * atan (tp * pow ((1.+sinphi)/(1.-sinphi), halfe)) - halfpi;
if (fabs (phi_l - lp.phi) < CONV) {
@@ -174,6 +174,7 @@ static PJ_LP e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse */
lp.lam = (xy.x == 0. && xy.y == 0.) ? 0. : atan2 (xy.x, xy.y);
return lp;
}
+ phi_l = lp.phi;
}
proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);