From 0bf400b620a25e20f2db8e5675f420f70a1faad1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 5 Jan 2011 11:03:21 +0000 Subject: [PATCH] Replace copy/clear with splice operation in order to transfer acomplete list into another one --- Convex_hull_3/include/CGAL/convex_hull_3.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Convex_hull_3/include/CGAL/convex_hull_3.h b/Convex_hull_3/include/CGAL/convex_hull_3.h index 62f37612ad5..b363f8475fe 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_3.h @@ -303,6 +303,9 @@ ch_quickhull_3_scan( typedef std::list Outside_set; typedef typename std::list::iterator Outside_set_iterator; + typedef typename CGAL::Unique_hash_map >::Data Data; + std::list visible_set; typename std::list::iterator vis_set_it; Outside_set vis_outside_set; @@ -334,12 +337,10 @@ ch_quickhull_3_scan( vis_set_it++) { // add its outside set to the global outside set list - std::copy(outside_sets[*vis_set_it].begin(), - outside_sets[*vis_set_it].end(), - std::back_inserter(vis_outside_set)); + Data& point_list = outside_sets[*vis_set_it]; + vis_outside_set.splice(vis_outside_set.end(), point_list, point_list.begin(), point_list.end()); // delete this visible facet P.erase_facet((*(*vis_set_it)).halfedge()); - outside_sets[*vis_set_it].clear(); } #ifdef CGAL_CH_3_WINDOW_DEBUG window << CGAL::RED;