From 8211f48b1ac6c941f46a8f2df90bdbfdcbc85981 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 18 Dec 2018 21:31:28 +0100 Subject: cpp conversion: fix zero-as-null-pointer-constant warnings --- src/PJ_laea.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/PJ_laea.cpp') diff --git a/src/PJ_laea.cpp b/src/PJ_laea.cpp index f1626a55..dd02c75a 100644 --- a/src/PJ_laea.cpp +++ b/src/PJ_laea.cpp @@ -227,10 +227,10 @@ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */ static PJ *destructor (PJ *P, int errlev) { - 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(P->opaque)->apa); @@ -242,7 +242,7 @@ static PJ *destructor (PJ *P, int errlev) { PJ *PROJECTION(laea) { double t; struct pj_opaque *Q = static_cast(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; @@ -261,7 +261,7 @@ PJ *PROJECTION(laea) { Q->qp = pj_qsfn(1., P->e, P->one_es); Q->mmf = .5 / (1. - P->es); Q->apa = pj_authset(P->es); - if (0==Q->apa) + if (nullptr==Q->apa) return destructor(P, ENOMEM); switch (Q->mode) { case N_POLE: -- cgit v1.2.3