mirror of https://github.com/CGAL/cgal
Replace the assertion about n>2 by a if
This commit is contained in:
parent
31b68de8b2
commit
51f8877e60
|
|
@ -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<Graph>::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<Graph>::null_face();
|
||||
}
|
||||
|
||||
std::vector<halfedge_descriptor> halfedges(n);
|
||||
std::vector<bool> is_new(n);
|
||||
|
|
|
|||
Loading…
Reference in New Issue