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_deformation.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/PJ_deformation.cpp') diff --git a/src/PJ_deformation.cpp b/src/PJ_deformation.cpp index 49f62c01..6c30f21c 100644 --- a/src/PJ_deformation.cpp +++ b/src/PJ_deformation.cpp @@ -248,10 +248,10 @@ static PJ_COORD reverse_4d(PJ_COORD in, PJ *P) { } 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); if (static_cast(P->opaque)->cart) @@ -265,12 +265,12 @@ PJ *TRANSFORMATION(deformation,1) { int has_xy_grids = 0; int has_z_grids = 0; struct pj_opaque *Q = static_cast(pj_calloc (1, sizeof (struct pj_opaque))); - if (0==Q) + if (nullptr==Q) return destructor(P, ENOMEM); P->opaque = (void *) Q; Q->cart = proj_create(P->ctx, "+proj=cart"); - if (Q->cart == 0) + if (Q->cart == nullptr) return destructor(P, ENOMEM); /* inherit ellipsoid definition from P to Q->cart */ @@ -313,8 +313,8 @@ PJ *TRANSFORMATION(deformation,1) { P->inv4d = reverse_4d; P->fwd3d = forward_3d; P->inv3d = reverse_3d; - P->fwd = 0; - P->inv = 0; + P->fwd = nullptr; + P->inv = nullptr; P->left = PJ_IO_UNITS_CARTESIAN; P->right = PJ_IO_UNITS_CARTESIAN; -- cgit v1.2.3