mirror of https://github.com/CGAL/cgal
Merge pull request #5665 from GilesBathgate/Polyhedron_3_TDS_3-compare_handle_nullptr-GilesBathgate
Polyhedron_3 and TDS_3 compare handle nullptr
This commit is contained in:
commit
bd98013623
|
|
@ -402,7 +402,7 @@ protected:
|
||||||
CGAL_assertion( ! last_vertex);
|
CGAL_assertion( ! last_vertex);
|
||||||
HalfedgeDS_items_decorator<HDS> decorator;
|
HalfedgeDS_items_decorator<HDS> decorator;
|
||||||
Halfedge_handle e = get_vertex_to_edge_map( w);
|
Halfedge_handle e = get_vertex_to_edge_map( w);
|
||||||
if ( e != Halfedge_handle()) {
|
if ( e != nullptr) {
|
||||||
CGAL_assertion( e->vertex() == index_to_vertex_map[w]);
|
CGAL_assertion( e->vertex() == index_to_vertex_map[w]);
|
||||||
// check that the facet has no self intersections
|
// check that the facet has no self intersections
|
||||||
if ( current_face != Face_handle()
|
if ( current_face != Face_handle()
|
||||||
|
|
@ -491,7 +491,7 @@ protected:
|
||||||
// Halfedge e points to a vertex w. Walk around w to find a hole
|
// Halfedge e points to a vertex w. Walk around w to find a hole
|
||||||
// in the facet structure. Report an error if none exist. Return
|
// in the facet structure. Report an error if none exist. Return
|
||||||
// the halfedge at this hole that points to the vertex w.
|
// the halfedge at this hole that points to the vertex w.
|
||||||
CGAL_assertion( e != Halfedge_handle());
|
CGAL_assertion( e != nullptr);
|
||||||
HalfedgeDS_items_decorator<HDS> decorator;
|
HalfedgeDS_items_decorator<HDS> decorator;
|
||||||
Halfedge_handle start_edge( e);
|
Halfedge_handle start_edge( e);
|
||||||
do {
|
do {
|
||||||
|
|
@ -649,7 +649,7 @@ add_vertex_to_facet( std::size_t v2) {
|
||||||
Halfedge_handle hole = lookup_hole( v1);
|
Halfedge_handle hole = lookup_hole( v1);
|
||||||
if ( m_error)
|
if ( m_error)
|
||||||
return;
|
return;
|
||||||
CGAL_assertion( hole != Halfedge_handle());
|
CGAL_assertion( hole != nullptr);
|
||||||
h2->opposite()->HBase::set_next( hole->next());
|
h2->opposite()->HBase::set_next( hole->next());
|
||||||
decorator.set_prev( hole->next(), h2->opposite());
|
decorator.set_prev( hole->next(), h2->opposite());
|
||||||
hole->HBase::set_next( h1->opposite());
|
hole->HBase::set_next( h1->opposite());
|
||||||
|
|
@ -689,7 +689,7 @@ add_vertex_to_facet( std::size_t v2) {
|
||||||
} while ( e->next() != prev && e != h1);
|
} while ( e->next() != prev && e != h1);
|
||||||
if ( e == h1) {
|
if ( e == h1) {
|
||||||
// disconnected facet complexes
|
// disconnected facet complexes
|
||||||
if ( hole != Halfedge_handle()) {
|
if ( hole != nullptr) {
|
||||||
// The complex can be connected with
|
// The complex can be connected with
|
||||||
// the hole at hprime.
|
// the hole at hprime.
|
||||||
hprime->HBase::set_next( hole->next());
|
hprime->HBase::set_next( hole->next());
|
||||||
|
|
@ -763,8 +763,8 @@ test_facet_indices( std::vector< std::size_t> indices) {
|
||||||
// check if halfedge is already in the HDS and is not border halfedge
|
// check if halfedge is already in the HDS and is not border halfedge
|
||||||
Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
|
Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
|
||||||
Vertex_handle w = index_to_vertex_map[indices[i+1]];
|
Vertex_handle w = index_to_vertex_map[indices[i+1]];
|
||||||
if ( v != Halfedge_handle()
|
if ( v != nullptr
|
||||||
&& get_vertex_to_edge_map(indices[i+1]) != Halfedge_handle()) {
|
&& get_vertex_to_edge_map(indices[i+1]) != nullptr) {
|
||||||
// cycle through halfedge-loop and find edge to indices[i+1]
|
// cycle through halfedge-loop and find edge to indices[i+1]
|
||||||
Halfedge_handle vstart = v;
|
Halfedge_handle vstart = v;
|
||||||
do {
|
do {
|
||||||
|
|
@ -780,7 +780,7 @@ test_facet_indices( std::vector< std::size_t> indices) {
|
||||||
// tested for non-manifold halfedges already, we just need to check
|
// tested for non-manifold halfedges already, we just need to check
|
||||||
// if the vertex indices[i] is not a closed manifold yet.
|
// if the vertex indices[i] is not a closed manifold yet.
|
||||||
Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
|
Halfedge_handle v = get_vertex_to_edge_map(indices[i]);
|
||||||
if ( v != Halfedge_handle()) {
|
if ( v != nullptr) {
|
||||||
Halfedge_handle vstart = v;
|
Halfedge_handle vstart = v;
|
||||||
do {
|
do {
|
||||||
v = v->next()->opposite();
|
v = v->next()->opposite();
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,8 @@ namespace internal {
|
||||||
|
|
||||||
bool operator==( const Self& x) const { return node == x.node; }
|
bool operator==( const Self& x) const { return node == x.node; }
|
||||||
bool operator!=( const Self& x) const { return node != x.node; }
|
bool operator!=( const Self& x) const { return node != x.node; }
|
||||||
|
bool operator==( std::nullptr_t) const { return node == nullptr; }
|
||||||
|
bool operator!=( std::nullptr_t) const { return node != nullptr; }
|
||||||
bool operator< ( const Self& x) const { return node< x.node; }
|
bool operator< ( const Self& x) const { return node< x.node; }
|
||||||
bool operator<=( const Self& x) const { return node<= x.node; }
|
bool operator<=( const Self& x) const { return node<= x.node; }
|
||||||
bool operator> ( const Self& x) const { return node> x.node; }
|
bool operator> ( const Self& x) const { return node> x.node; }
|
||||||
|
|
@ -139,6 +141,8 @@ namespace internal {
|
||||||
|
|
||||||
bool operator==( const Self& x) const { return node == x.node; }
|
bool operator==( const Self& x) const { return node == x.node; }
|
||||||
bool operator!=( const Self& x) const { return node != x.node; }
|
bool operator!=( const Self& x) const { return node != x.node; }
|
||||||
|
bool operator==( std::nullptr_t) const { return node == nullptr; }
|
||||||
|
bool operator!=( std::nullptr_t) const { return node != nullptr; }
|
||||||
bool operator< ( const Self& x) const { return node< x.node; }
|
bool operator< ( const Self& x) const { return node< x.node; }
|
||||||
bool operator<=( const Self& x) const { return node<= x.node; }
|
bool operator<=( const Self& x) const { return node<= x.node; }
|
||||||
bool operator> ( const Self& x) const { return node> x.node; }
|
bool operator> ( const Self& x) const { return node> x.node; }
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,8 @@ public:
|
||||||
tmp += n;
|
tmp += n;
|
||||||
return tmp.operator*();
|
return tmp.operator*();
|
||||||
}
|
}
|
||||||
|
bool operator==( std::nullptr_t) const { return ptr == nullptr; }
|
||||||
|
bool operator!=( std::nullptr_t) const { return ptr != nullptr; }
|
||||||
bool operator< ( const Self& i) const { return ( ptr < i.ptr); }
|
bool operator< ( const Self& i) const { return ( ptr < i.ptr); }
|
||||||
bool operator> ( const Self& i) const { return i < *this; }
|
bool operator> ( const Self& i) const { return i < *this; }
|
||||||
bool operator<=( const Self& i) const { return !(i < *this); }
|
bool operator<=( const Self& i) const { return !(i < *this); }
|
||||||
|
|
|
||||||
|
|
@ -1924,7 +1924,7 @@ create_star_2(Vertex_handle v, Cell_handle c, int li )
|
||||||
// pnew is null at the first iteration
|
// pnew is null at the first iteration
|
||||||
v1->set_cell(cnew);
|
v1->set_cell(cnew);
|
||||||
//pnew->set_neighbor( cw(pnew->index(v1)), cnew );
|
//pnew->set_neighbor( cw(pnew->index(v1)), cnew );
|
||||||
if (pnew != Cell_handle()) { pnew->set_neighbor( 1, cnew );}
|
if (pnew != nullptr) { pnew->set_neighbor( 1, cnew );}
|
||||||
|
|
||||||
bound = cur;
|
bound = cur;
|
||||||
i1 = ccw(i1);
|
i1 = ccw(i1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue