Update of /cvsroot/monetdb/geom/src/lib
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15501/src/lib

Modified Files:
        libgeom.mx 
Log Message:
propagated changes of Wednesday Jun 04 2008 - Thursday Jun 05 2008
from the Geom_0-4 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/06/04 - stmane: src/lib/libgeom.mx,1.5.4.2 src/monetdb5/geom.mx,1.13.4.3

as suggested by Sjoerd (Thanks!):
use const-declared variable for constant result
instead of casting the result to non-constant variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/06/05 - stmane: src/lib/libgeom.mx,1.5.4.3 src/monetdb5/geom.mx,1.13.4.4

next attempt to fix compilation with gcc 4.3.0 on Gentoo:
declare variables with all type qualifiers, i.e.,
"const GEOS... GOES_DLL"
instead of only
"const GEOS..."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: libgeom.mx
===================================================================
RCS file: /cvsroot/monetdb/geom/src/lib/libgeom.mx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- libgeom.mx  27 May 2008 14:20:25 -0000      1.6
+++ libgeom.mx  5 Jun 2008 09:09:54 -0000       1.7
@@ -172,14 +172,13 @@
 getMbrGeos( mbr *res, const GEOSGeom geosGeometry )
 {
        GEOSGeom envelope;
-       GEOSCoordSeq coords;
        double xmin, ymin, xmax, ymax;
 
        if (!geosGeometry || (envelope = GEOSEnvelope(geosGeometry)) == NULL)
                return 0;
 
        if (GEOSGeomTypeId(envelope) == GEOS_POINT) {
-               coords = (GEOSCoordSeq)GEOSGeom_getCoordSeq(envelope);
+               const GEOSCoordSeq GEOS_DLL coords = 
GEOSGeom_getCoordSeq(envelope);
                GEOSCoordSeq_getX(coords, 0, &xmin);
                GEOSCoordSeq_getY(coords, 0, &ymin);
                res->xmin = xmin;
@@ -187,9 +186,9 @@
                res->xmax = xmin;
                res->ymax = ymin;
        } else { /* GEOSGeomTypeId(envelope) == GEOS_POLYGON */
-               GEOSGeom ring = (GEOSGeom)GEOSGetExteriorRing(envelope);
+               const GEOSGeom GEOS_DLL ring = GEOSGetExteriorRing(envelope);
                if (ring) {
-                       coords = (GEOSCoordSeq)GEOSGeom_getCoordSeq(ring); 
+                       const GEOSCoordSeq GEOS_DLL coords = 
GEOSGeom_getCoordSeq(ring); 
                        GEOSCoordSeq_getX(coords, 0, &xmin);
                        GEOSCoordSeq_getY(coords, 0, &ymin);
                        GEOSCoordSeq_getX(coords, 2, &xmax);


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to