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_affine.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/PJ_affine.cpp') diff --git a/src/PJ_affine.cpp b/src/PJ_affine.cpp index c53d4e60..e2b668d3 100644 --- a/src/PJ_affine.cpp +++ b/src/PJ_affine.cpp @@ -112,8 +112,8 @@ static LP reverse_2d(XY xy, PJ *P) { static struct pj_opaque_affine * initQ() { struct pj_opaque_affine *Q = static_cast(pj_calloc(1, sizeof(struct pj_opaque_affine))); - if (0==Q) - return 0; + if (nullptr==Q) + return nullptr; /* default values */ Q->forward.s11 = 1.0; @@ -157,9 +157,9 @@ static void computeReverseParameters(PJ* P) if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_DEBUG) { proj_log_debug(P, "Affine: matrix non invertible"); } - P->inv4d = NULL; - P->inv3d = NULL; - P->inv = NULL; + P->inv4d = nullptr; + P->inv3d = nullptr; + P->inv = nullptr; } else { Q->reverse.s11 = A / det; Q->reverse.s12 = D / det; @@ -176,7 +176,7 @@ static void computeReverseParameters(PJ* P) PJ *TRANSFORMATION(affine,0 /* no need for ellipsoid */) { struct pj_opaque_affine *Q = initQ(); - if (0==Q) + if (nullptr==Q) return pj_default_destructor(P, ENOMEM); P->opaque = (void *) Q; @@ -227,7 +227,7 @@ PJ *TRANSFORMATION(affine,0 /* no need for ellipsoid */) { PJ *TRANSFORMATION(geogoffset,0 /* no need for ellipsoid */) { struct pj_opaque_affine *Q = initQ(); - if (0==Q) + if (nullptr==Q) return pj_default_destructor(P, ENOMEM); P->opaque = (void *) Q; -- cgit v1.2.3