diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 3f18c2f5e57..01d8930fa03 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -381,7 +381,7 @@ public: // Insert "num_points_seq" points sequentially // (or more if dim < 3 after that) size_t num_points_seq = (std::min)(num_points, (size_t)100); - while (dimension() < 3 || i < num_points_seq) + while (i < num_points_seq || (dimension() < 3 && i < num_points)) { hint = insert(points[i], hint); ++i; @@ -464,7 +464,7 @@ private: // Insert "num_points_seq" points sequentially // (or more if dim < 3 after that) size_t num_points_seq = (std::min)(num_points, (size_t)100); - while (dimension() < 3 || i < num_points_seq) + while (i < num_points_seq || (dimension() < 3 && i < num_points)) { hint = insert(points[indices[i]], hint); if (hint != Vertex_handle()) hint->info() = infos[indices[i]]; diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_3.h index 7287944d586..bdb6d561bba 100644 --- a/Triangulation_3/include/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Regular_triangulation_3.h @@ -360,7 +360,7 @@ namespace CGAL { // Insert "num_points_seq" points sequentially // (or more if dim < 3 after that) size_t num_points_seq = (std::min)(num_points, (size_t)100); - while (dimension() < 3 || i < num_points_seq) + while (i < num_points_seq || (dimension() < 3 && i < num_points)) { Locate_type lt; Cell_handle c; @@ -483,7 +483,7 @@ namespace CGAL { // Insert "num_points_seq" points sequentially // (or more if dim < 3 after that) size_t num_points_seq = (std::min)(num_points, (size_t)100); - while (dimension() < 3 || i < num_points_seq) + while (i < num_points_seq || (dimension() < 3 && i < num_points)) { Locate_type lt; Cell_handle c;