]> granicus.if.org Git - postgis/commitdiff
const-correct lw*_is_closed
authorSandro Santilli <strk@keybit.net>
Wed, 6 Jul 2011 07:42:13 +0000 (07:42 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 6 Jul 2011 07:42:13 +0000 (07:42 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7601 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/liblwgeom.h
liblwgeom/lwcircstring.c
liblwgeom/lwcompound.c
liblwgeom/lwline.c
liblwgeom/lwpsurface.c
liblwgeom/lwtin.c

index 584388f233ef185b0a5f80f0910ec814478d3cbc..253854a43b097ec22d143f1ff6bc31b46783317b 100644 (file)
@@ -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 
index a255fce892c6598144a1feb164973d0ec8b52e3d..060dceceac4a2fc11b5b03ec186eeb1a3a631ce6 100644 (file)
@@ -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);
index acb1b94616ca31f0b30d4aae3e8b46aa2cca314f..d9e959dcd3d46d0e5adbb8425d2123b7edaeba93 100644 (file)
@@ -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
+}
index 348f1b56c715387545aa6f39713ce282acf6fbce..e6dc2b2fab20bef3c44e1a0dd6380c827d47b72a 100644 (file)
@@ -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);
index 26237d9b4057e9ebb62ee4279a6e91494e04f20c..ac56488a5357ca7a5fdd9d25ece84ab0cbd678e7 100644 (file)
@@ -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;
index 11993dd25849b4ee0f9c099828c884df09879258..d616ce2958bc9e4e8df48e6095296ec102d8198b 100644 (file)
@@ -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;