diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-18 21:31:28 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-26 10:08:53 +0100 |
| commit | 8211f48b1ac6c941f46a8f2df90bdbfdcbc85981 (patch) | |
| tree | 1cd5751c91202070ba3ab6fbbbfbeb7832b980fc /src/PJ_eqearth.cpp | |
| parent | 919dc5ca50839541568ef5c0f18f2156d639beef (diff) | |
| download | PROJ-8211f48b1ac6c941f46a8f2df90bdbfdcbc85981.tar.gz PROJ-8211f48b1ac6c941f46a8f2df90bdbfdcbc85981.zip | |
cpp conversion: fix zero-as-null-pointer-constant warnings
Diffstat (limited to 'src/PJ_eqearth.cpp')
| -rw-r--r-- | src/PJ_eqearth.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PJ_eqearth.cpp b/src/PJ_eqearth.cpp index 3547d683..e5c1f974 100644 --- a/src/PJ_eqearth.cpp +++ b/src/PJ_eqearth.cpp @@ -130,10 +130,10 @@ static LP e_inverse (XY xy, PJ *P) { /* Ellipsoidal/spheroidal, invers } static PJ *destructor (PJ *P, int errlev) { /* Destructor */ - if (0==P) - return 0; + if (nullptr==P) + return nullptr; - if (0==P->opaque) + if (nullptr==P->opaque) return pj_default_destructor (P, errlev); pj_dealloc (static_cast<struct pj_opaque*>(P->opaque)->apa); @@ -143,7 +143,7 @@ static PJ *destructor (PJ *P, int errlev) { /* Destructor */ PJ *PROJECTION(eqearth) { struct pj_opaque *Q = static_cast<struct pj_opaque*>(pj_calloc (1, sizeof (struct pj_opaque))); - if (0==Q) + if (nullptr==Q) return pj_default_destructor (P, ENOMEM); P->opaque = Q; P->destructor = destructor; @@ -154,7 +154,7 @@ PJ *PROJECTION(eqearth) { /* Ellipsoidal case */ if (P->es != 0.0) { Q->apa = pj_authset(P->es); /* For auth_lat(). */ - if (0 == Q->apa) + if (nullptr == Q->apa) return destructor(P, ENOMEM); Q->qp = pj_qsfn(1.0, P->e, P->one_es); /* For auth_lat(). */ Q->rqda = sqrt(0.5*Q->qp); /* Authalic radius divided by major axis */ |
