diff --git a/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h index adc9ee7b65b..58ba387b755 100644 --- a/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -139,7 +139,7 @@ public: \tparam PointOnSphereIterator must be a model of `InputIterator` with value type `Point`. */ template - std::ptrdiff_t insert(PointOnSphereIterator first, PointOnSphereIterator beyond); + size_type insert(PointOnSphereIterator first, PointOnSphereIterator beyond); /*! removes the vertex `v` from the triangulation. diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h index b9fb020e4d1..4b03e868693 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -59,6 +59,8 @@ public: typedef typename Geom_traits::Segment_3 Segment_3; typedef typename Geom_traits::Arc_on_sphere_2 Arc_on_sphere_2; + typedef typename Base::size_type size_type; + typedef typename Base::Vertex Vertex; typedef typename Base::Vertex_handle Vertex_handle; typedef typename Base::Edge Edge; @@ -266,17 +268,17 @@ public: // Input range has value type Point, with Point != Point_3 template - int insert(InputIterator first, InputIterator beyond, - typename std::enable_if< - !std::is_same::value_type, - Point_3>::value>::type* = nullptr); + size_type insert(InputIterator first, InputIterator beyond, + typename std::enable_if< + !std::is_same::value_type, + Point_3>::value>::type* = nullptr); // Input range has value type Point_3, possibly with Point == Point_3 template - int insert(InputIterator first, InputIterator beyond, - typename std::enable_if< - std::is_same::value_type, - Point_3>::value>::type* = nullptr); + size_type insert(InputIterator first, InputIterator beyond, + typename std::enable_if< + std::is_same::value_type, + Point_3>::value>::type* = nullptr); bool update_ghost_faces(Vertex_handle v, bool first = false); @@ -599,7 +601,7 @@ insert(const Point& p, Face_handle start) template template -int +typename Delaunay_triangulation_on_sphere_2::size_type Delaunay_triangulation_on_sphere_2:: insert(InputIterator first, InputIterator beyond, typename std::enable_if< @@ -609,7 +611,7 @@ insert(InputIterator first, InputIterator beyond, CGAL_static_assertion((std::is_same::value_type, Point>::value)); CGAL_static_assertion(!(std::is_same::value)); - const int n = number_of_vertices(); + const size_type n = number_of_vertices(); // On paper, Spatial_sort_traits_adapter_3 should be used. However, it is not compatible // with spatial_sort_on_sphere() because of the way Transform_coordinates_traits_3 were written: @@ -663,14 +665,14 @@ insert(InputIterator first, InputIterator beyond, template template -int +typename Delaunay_triangulation_on_sphere_2::size_type Delaunay_triangulation_on_sphere_2:: insert(InputIterator first, InputIterator beyond, typename std::enable_if< std::is_same::value_type, Point_3>::value>::type*) { - const int n = number_of_vertices(); + const size_type n = number_of_vertices(); std::vector points(first, beyond); CGAL::cpp98::random_shuffle(points.begin(), points.end());