diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h index 7764961d320..1bb84ded7f4 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h @@ -168,11 +168,6 @@ convert_polygon_iterator(InputIterator it, const Traits& traits) // Converts General_polygon_with_holes_2 to Polygon_with_holes_2 template struct Polygon_converter { - using Pgn = Polygon_2; - using Polyline_traits = typename Gps_polyline_traits::Polyline_traits; - using Traits = typename Gps_polyline_traits::Traits; - using General_polygon_with_holes = typename Traits::Polygon_with_holes_2; - //! The output iterator. OutputIterator& m_output; @@ -180,7 +175,9 @@ struct Polygon_converter { Polygon_converter(OutputIterator& output) : m_output(output) {} // Convert and export to output iterator. - void operator()(const General_polygon_with_holes& gpwh) const + template + void operator()(const General_polygon_with_holes_2 + >& gpwh) const { *m_output++ = convert_polygon_back(gpwh); } }; @@ -225,34 +222,6 @@ convert_polygon_back(OutputIterator& output, (output); } -// Utility for checking if polygon remains the same after being -// converted and back -template -Polygon_2 -test_conversion(const Polygon_2& polygon) -{ - typedef Polygon_2 Pgn; - typedef Polygon_with_holes_2 Pgn_with_holes; - typedef typename Gps_default_traits::Arr_traits Segment_traits; - typedef Arr_polyline_traits_2 Polyline_traits; - typedef Gps_traits_2 Traits; - - using General_polygon = typename Traits::Polygon_2; - using General_polygon_with_holes = typename Traits::Polygon_with_holes_2; - Polyline_traits traits; - - General_polygon polygon2 = convert_polygon(polygon, traits); - return convert_polygon_back(polygon2); - // General_polygon_with_holes polygon3(polygon2); - - // Pgn_with_holes out; - // Oneset_iterator iterator(out); - // auto converter = convert_polygon_back(iterator, polygon3); - // *converter++ = polygon3; - - // return out.outer_boundary(); -} - } #endif // CGAL_BSO_POLYGON_CONVERSIONS_H