~sharpie/geos/3.3.2

« back to all changes in this revision

Viewing changes to source/algorithm/ConvexHull.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2009-03-27 15:54:54 UTC
  • mfrom: (1.2.1 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090327155454-o3u9j86rzrtcp5vl
Tags: 3.1.0-1
* New upstream release.
* This version includes also a missing header inclusion, which caused FTBFS
  on armel. (Closes: #520447)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**********************************************************************
2
 
 * $Id: ConvexHull.cpp 1820 2006-09-06 16:54:23Z mloskot $
 
2
 * $Id: ConvexHull.cpp 2131 2008-07-15 22:04:51Z mloskot $
3
3
 *
4
4
 * GEOS - Geometry Engine Open Source
5
5
 * http://geos.refractions.net
164
164
        // Remove consecutive equal Coordinates
165
165
        // unique() returns an iterator to the end of the resulting
166
166
        // sequence, we erase from there to the end.
167
 
        dest.erase( unique(dest.begin(),dest.end()), dest.end() );
 
167
        dest.erase( std::unique(dest.begin(),dest.end()), dest.end() );
168
168
 
169
169
        // points must all lie in a line        
170
170
        if ( dest.size() < 3 ) return false;
269
269
        }
270
270
 
271
271
        // sort the points radially around the focal point.
272
 
        sort(pts.begin(), pts.end(), RadiallyLessThen(pts[0]));
 
272
    std::sort(pts.begin(), pts.end(), RadiallyLessThen(pts[0]));
273
273
}
274
274
 
275
275
/*private*/