From 00980bf63fae6d350f425c44a648f33d7c09a931 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 26 Apr 2019 18:18:30 +0200 Subject: Prefix inverse and forward functions by their projection names This is mostly to have better OSSFuzz report. Currently a lot of bug summaries are like `proj4/standard_fuzzer: Divide-by-zero in s_inverse` By prefixing the projection name, we will get better reports, like `Divide-by-zero in airy_s_inverse` This also makes it slightly easier to set a breakpoint by function name. --- src/projections/sch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/projections/sch.cpp') diff --git a/src/projections/sch.cpp b/src/projections/sch.cpp index c6fb6145..e302c1da 100644 --- a/src/projections/sch.cpp +++ b/src/projections/sch.cpp @@ -55,7 +55,7 @@ struct pj_opaque { PROJ_HEAD(sch, "Spherical Cross-track Height") "\n\tMisc\n\tplat_0= plon_0= phdg_0= [h_0=]"; -static PJ_LPZ inverse3d(PJ_XYZ xyz, PJ *P) { +static PJ_LPZ sch_inverse3d(PJ_XYZ xyz, PJ *P) { PJ_LPZ lpz = {0.0, 0.0, 0.0}; struct pj_opaque *Q = static_cast(P->opaque); double temp[3]; @@ -93,7 +93,7 @@ static PJ_LPZ inverse3d(PJ_XYZ xyz, PJ *P) { return lpz; } -static PJ_XYZ forward3d(PJ_LPZ lpz, PJ *P) { +static PJ_XYZ sch_forward3d(PJ_LPZ lpz, PJ *P) { PJ_XYZ xyz = {0.0, 0.0, 0.0}; struct pj_opaque *Q = static_cast(P->opaque); double temp[3]; @@ -187,8 +187,8 @@ static PJ *setup(PJ *P) { /* general initialization */ Q->xyzoff[1] = pxyz[1] - (Q->rcurv) * clt * slo; Q->xyzoff[2] = pxyz[2] - (Q->rcurv) * slt; - P->fwd3d = forward3d; - P->inv3d = inverse3d; + P->fwd3d = sch_forward3d; + P->inv3d = sch_inverse3d; return P; } -- cgit v1.2.3