diff --git a/Packages/Partition_2/changes.txt b/Packages/Partition_2/changes.txt index 7530724333f..94af6925cfd 100644 --- a/Packages/Partition_2/changes.txt +++ b/Packages/Partition_2/changes.txt @@ -1,3 +1,7 @@ +1.23 (2 Dec 2001) + - added some CGAL prefixes to make SunPro happy + - also changed to use of std::sort instead of sort in std::list + 1.22 (26 Oct 2001) - fixed bug in Indirect_edge_compare for comparing edge with itself diff --git a/Packages/Partition_2/include/CGAL/Partition_traits_2.h b/Packages/Partition_2/include/CGAL/Partition_traits_2.h index 6ffb6caf540..af7d2e740a7 100644 --- a/Packages/Partition_2/include/CGAL/Partition_traits_2.h +++ b/Packages/Partition_2/include/CGAL/Partition_traits_2.h @@ -53,8 +53,8 @@ class Partition_traits_2 : public Partition_traits_2_base typedef typename R::Orientation_2 Orientation_2; typedef typename R::Compare_y_2 Compare_y_2; typedef typename R::Compare_x_2 Compare_x_2; - typedef Is_convex_2 Is_convex_2; - typedef Is_y_monotone_2 Is_y_monotone_2; + typedef CGAL::Is_convex_2 Is_convex_2; + typedef CGAL::Is_y_monotone_2 Is_y_monotone_2; // needed by Indirect_edge_compare, used in y_monotone and greene_approx typedef typename R::Line_2 Line_2; @@ -63,7 +63,7 @@ class Partition_traits_2 : public Partition_traits_2_base typedef typename R::Is_horizontal_2 Is_horizontal_2; // needed by visibility graph and thus by optimal convex - typedef Ray_2 Ray_2; + typedef R::Ray_2 Ray_2; typedef typename R::Collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; typedef typename R::Are_strictly_ordered_along_line_2 diff --git a/Packages/Partition_2/include/CGAL/Partition_vertex_map.h b/Packages/Partition_2/include/CGAL/Partition_vertex_map.h index fefe636e124..16ec254b6bd 100644 --- a/Packages/Partition_2/include/CGAL/Partition_vertex_map.h +++ b/Packages/Partition_2/include/CGAL/Partition_vertex_map.h @@ -52,7 +52,7 @@ public: typedef typename Traits::Leftturn_2 Leftturn_2; typedef typename Traits::Less_xy_2 Less_xy_2; typedef typename Traits::Point_2 Point_2; - typedef Edge_info Edge_info; + typedef CGAL::Edge_info Edge_info; CW_indirect_edge_info_compare (Iterator v_it) : vertex_it(v_it), left_turn(Traits().leftturn_2_object()), @@ -186,7 +186,8 @@ public: // order), and this is what you need when you construct the union // polygon. if (size() > 2) - sort(CW_indirect_edge_info_compare(vertex_it)); + std::sort(begin(), end(), + CW_indirect_edge_info_compare(vertex_it)); #ifdef CGAL_PARTITION_CHECK_DEBUG std::cout << "after sort: edges for " << *vertex_it << std::endl; @@ -392,9 +393,9 @@ public: // order), and this is what you need to begin the construction // of the union polygon. if ((*m_it).second.size() > 2) - (*m_it).second.sort( + std::sort((*m_it).second.begin(), (*m_it).second.end(), CW_indirect_edge_info_compare( - (*m_it).first)); + (*m_it).first)); // find the previous vertex in this vertex's list next_v_it=(*m_it).second.next_ccw_edge_info(prev_v_it).endpoint(); if (next_v_it != first_v_it) diff --git a/Packages/Partition_2/include/CGAL/Partitioned_polygon_2.h b/Packages/Partition_2/include/CGAL/Partitioned_polygon_2.h index b4f1fbdd5df..a15cd228d0f 100644 --- a/Packages/Partition_2/include/CGAL/Partitioned_polygon_2.h +++ b/Packages/Partition_2/include/CGAL/Partitioned_polygon_2.h @@ -353,8 +353,8 @@ class Partition_vertex : public Traits_::Point_2 // and remove any duplicate diagonals void sort_diagonals(const Circulator& prev, const Circulator& next) { - diag_endpoint_refs.sort( - Indirect_CW_diag_compare(*this, prev, next)); + std::sort(diag_endpoint_refs.begin(), diag_endpoint_refs.end(), + Indirect_CW_diag_compare(*this, prev, next)); diag_endpoint_refs.unique(); current_diag = diag_endpoint_refs.begin(); } diff --git a/Packages/Partition_2/include/CGAL/Vertex_visibility_graph_2.C b/Packages/Partition_2/include/CGAL/Vertex_visibility_graph_2.C index 0b7bca6ed7c..cf4c2798223 100644 --- a/Packages/Partition_2/include/CGAL/Vertex_visibility_graph_2.C +++ b/Packages/Partition_2/include/CGAL/Vertex_visibility_graph_2.C @@ -176,7 +176,8 @@ Vertex_visibility_graph_2::initialize_vertex_map( // Sort the event list (iterators to points) from left to right // (using less_xy) - iterator_list.sort(Indirect_less_xy_2()); + std::sort(iterator_list.begin(), iterator_list.end(), + Indirect_less_xy_2()); // Create an ordered list of edge endpoints (iterators), initially empty typedef std::set< Point_pair, Segment_less_yx_2 > Ordered_edge_set; diff --git a/Packages/Partition_2/include/CGAL/partition_y_monotone_2.h b/Packages/Partition_2/include/CGAL/partition_y_monotone_2.h index 09da11f9522..c9a69779cbd 100644 --- a/Packages/Partition_2/include/CGAL/partition_y_monotone_2.h +++ b/Packages/Partition_2/include/CGAL/partition_y_monotone_2.h @@ -440,7 +440,8 @@ OutputIterator partition_y_monotone_2(InputIterator first, Circulator first_c(polygon.begin(), polygon.end()); Circulator_list circ_list(first_c); - circ_list.sort(Indirect_not_less_yx_2(traits)); + std::sort(circ_list.begin(), circ_list.end(), + Indirect_not_less_yx_2(traits)); #ifdef CGAL_PARTITION_Y_MONOTONE_DEBUG std::cout << "Initial vertex list: "<< circ_list << std::endl;