From 51f8877e60f5f37bd1c70bd4ce6b851f8ecf1c1a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 13 Dec 2018 09:17:46 +0100 Subject: [PATCH] Replace the assertion about n>2 by a if --- BGL/include/CGAL/boost/graph/Euler_operations.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/Euler_operations.h b/BGL/include/CGAL/boost/graph/Euler_operations.h index 1375e41c68a..04b415b207c 100644 --- a/BGL/include/CGAL/boost/graph/Euler_operations.h +++ b/BGL/include/CGAL/boost/graph/Euler_operations.h @@ -587,11 +587,14 @@ add_face(const VertexRange& vr, Graph& g) unsigned int n = (unsigned int)vertices.size(); //check that every vertex is unique std::sort(vertices.begin(), vertices.end()); - if(std::adjacent_find(vertices.begin(), vertices.end()) != vertices.end()) + if(std::adjacent_find(vertices.begin(), vertices.end()) != vertices.end()){ return boost::graph_traits::null_face(); + } std::copy(vr.begin(), vr.end(), vertices.begin()); // don't allow degenerated faces - CGAL_assertion(n > 2); + if(n <= 2){ + return boost::graph_traits::null_face(); + } std::vector halfedges(n); std::vector is_new(n);