From: Sandro Santilli Date: Wed, 6 Jul 2011 07:42:13 +0000 (+0000) Subject: const-correct lw*_is_closed X-Git-Tag: 2.0.0alpha1~1241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7df2a4d4e03c0753cc9aa609ec651816da793383;p=postgis const-correct lw*_is_closed git-svn-id: http://svn.osgeo.org/postgis/trunk@7601 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/liblwgeom.h b/liblwgeom/liblwgeom.h index 584388f23..253854a43 100644 --- a/liblwgeom/liblwgeom.h +++ b/liblwgeom/liblwgeom.h @@ -1584,11 +1584,11 @@ extern int lwcollection_compute_box2d_p(const LWCOLLECTION *col, BOX2DFLOAT4 *bo extern int lwcircstring_compute_box2d_p(const LWCIRCSTRING *curve, BOX2DFLOAT4 *box); extern BOX2DFLOAT4* lwgeom_compute_box2d(const LWGEOM *lwgeom); extern char* lwpoint_to_latlon(const LWPOINT *p, const char *format); -extern int lwline_is_closed(LWLINE *line); -extern int lwcircstring_is_closed(LWCIRCSTRING *curve); -extern int lwcompound_is_closed(LWCOMPOUND *curve); -extern int lwpsurface_is_closed(LWPSURFACE *psurface); -extern int lwtin_is_closed(LWTIN *tin); +extern int lwline_is_closed(const LWLINE *line); +extern int lwcircstring_is_closed(const LWCIRCSTRING *curve); +extern int lwcompound_is_closed(const LWCOMPOUND *curve); +extern int lwpsurface_is_closed(const LWPSURFACE *psurface); +extern int lwtin_is_closed(const LWTIN *tin); /** * Ensure the outer ring is clockwise oriented and all inner rings diff --git a/liblwgeom/lwcircstring.c b/liblwgeom/lwcircstring.c index a255fce89..060dcecea 100644 --- a/liblwgeom/lwcircstring.c +++ b/liblwgeom/lwcircstring.c @@ -738,7 +738,7 @@ lwcircstring_setPoint4d(LWCIRCSTRING *curve, uint32 index, POINT4D *newpoint) } int -lwcircstring_is_closed(LWCIRCSTRING *curve) +lwcircstring_is_closed(const LWCIRCSTRING *curve) { if (FLAGS_GET_Z(curve->flags)) return ptarray_isclosed3d(curve->points); diff --git a/liblwgeom/lwcompound.c b/liblwgeom/lwcompound.c index acb1b9461..d9e959dcd 100644 --- a/liblwgeom/lwcompound.c +++ b/liblwgeom/lwcompound.c @@ -70,7 +70,7 @@ lwcompound_deserialize(uchar *serialized) } int -lwcompound_is_closed(LWCOMPOUND *compound) +lwcompound_is_closed(const LWCOMPOUND *compound) { size_t size; int npoints=0; @@ -148,4 +148,4 @@ int lwcompound_add_lwgeom(LWCOMPOUND *comp, LWGEOM *geom) col = lwcollection_add_lwgeom(col, geom); return LW_SUCCESS; -} \ No newline at end of file +} diff --git a/liblwgeom/lwline.c b/liblwgeom/lwline.c index 348f1b56c..e6dc2b2fa 100644 --- a/liblwgeom/lwline.c +++ b/liblwgeom/lwline.c @@ -607,7 +607,7 @@ lwline_remove_repeated_points(LWLINE *lwline) } int -lwline_is_closed(LWLINE *line) +lwline_is_closed(const LWLINE *line) { if (FLAGS_GET_Z(line->type)) return ptarray_isclosed3d(line->points); diff --git a/liblwgeom/lwpsurface.c b/liblwgeom/lwpsurface.c index 26237d9b4..ac56488a5 100644 --- a/liblwgeom/lwpsurface.c +++ b/liblwgeom/lwpsurface.c @@ -145,7 +145,7 @@ typedef struct struct_psurface_arcs *psurface_arcs; /* We supposed that the geometry is valid we could have wrong result if not */ -int lwpsurface_is_closed(LWPSURFACE *psurface) +int lwpsurface_is_closed(const LWPSURFACE *psurface) { int i, j, k; int narcs, carc; diff --git a/liblwgeom/lwtin.c b/liblwgeom/lwtin.c index 11993dd25..d616ce295 100644 --- a/liblwgeom/lwtin.c +++ b/liblwgeom/lwtin.c @@ -138,7 +138,7 @@ typedef struct struct_tin_arcs *tin_arcs; /* We supposed that the geometry is valid we could have wrong result if not */ -int lwtin_is_closed(LWTIN *tin) +int lwtin_is_closed(const LWTIN *tin) { int i, j, k; int narcs, carc;