Opened 3 years ago

Closed 3 years ago

#4965 closed enhancement (fixed)

getPoint2d_p_ro is redundant

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 3.2.0
Component: liblwgeom Version: master
Keywords: Cc:

Description

The getPoint2d_cp() function does the same thing with a cleaner user interface (more const correctness)

getPoint2d_cp is defined in liblwgeom/lwinline.h which is included by liblwgeom_internal.h

Change History (3)

comment:1 by strk, 3 years ago

The comment above the definition of getPoint2d_p_ro, which is in lwgeodetic.c, says:

/**
* This function can only be used on LWGEOM that is built on top of
* GSERIALIZED, otherwise alignment errors will ensue.
*/
int getPoint2d_p_ro(const POINTARRAY *pa, uint32_t n, POINT2D **point)

Is that true, Paul ? Doesn't sound correct to me ? How can you build a POINTARRAY which is not aligned ?

comment:2 by strk, 3 years ago

Proposed change (drop of the redundant function): https://gitlab.com/postgis/postgis/-/merge_requests/53

comment:3 by Sandro Santilli <strk@…>, 3 years ago

Resolution: fixed
Status: newclosed

In b4f0beef/git:

Drop redundant getPoint2d_p_ro function

Closes #4965

Note: See TracTickets for help on using tickets.