]> granicus.if.org Git - postgis/commitdiff
Remove warning from lwline
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 Jan 2010 20:20:47 +0000 (20:20 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 Jan 2010 20:20:47 +0000 (20:20 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5170 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwline.c

index d9adfb483aa33b2f1c50e188ea74cbc483c53df3..8dff039fe05be1947c9097864a72bf3b2e0ce501 100644 (file)
@@ -564,8 +564,13 @@ lwline_measured_from_lwline(const LWLINE *lwline, double m_start, double m_end)
        for( i = 0; i < npoints; i++ )
        {               
                POINT4D q;
+               POINT2D a, b;
                getPoint3dz_p(lwline->points, i, &p2);
-               length_so_far += distance2d_pt_pt((POINT2D*)&p1, (POINT2D*)&p2);
+               a.x = p1.x;
+               a.y = p1.y;
+               b.x = p2.x;
+               b.y = p2.y;
+               length_so_far += distance2d_pt_pt(&a, &b);
                if ( length > 0.0 )
                        m = m_start + m_range * length_so_far / length;
                else