Code

update from 2geom (bug fix)
authorjfbarraud <jfbarraud@users.sourceforge.net>
Mon, 9 Mar 2009 23:36:56 +0000 (23:36 +0000)
committerjfbarraud <jfbarraud@users.sourceforge.net>
Mon, 9 Mar 2009 23:36:56 +0000 (23:36 +0000)
src/2geom/basic-intersection.cpp

index c03023e6fecddbb8bb952e521f1664ff7ae69526..0c8b96ddff3084f28449044dfb253889172f8aa0 100644 (file)
@@ -97,7 +97,8 @@ find_self_intersections(std::vector<std::pair<double, double> > &xs,
     dr.push_back(1);
     // We want to be sure that we have no empty segments
     sort(dr.begin(), dr.end());
-    unique(dr.begin(), dr.end());
+    vector<double>::iterator new_end = unique(dr.begin(), dr.end());
+    dr.resize( new_end - dr.begin() );
 
     vector<vector<Point> > pieces;
     {