Skip to content

Commit

Permalink
Morte replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Jun 5, 2019
1 parent 5532b84 commit 4581f1b
Show file tree
Hide file tree
Showing 306 changed files with 2,259 additions and 2,259 deletions.
20 changes: 10 additions & 10 deletions AABB_tree/include/CGAL/AABB_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,17 +487,17 @@ namespace CGAL {
if( size() > 1 ) {
delete [] m_p_root_node;
}
m_p_root_node = NULL;
m_p_root_node = nullptr;
}

// clears internal KD tree
void clear_search_tree() const
{
if ( m_search_tree_constructed )
{
CGAL_assertion( m_p_search_tree!=NULL );
CGAL_assertion( m_p_search_tree!=nullptr );
delete m_p_search_tree;
m_p_search_tree = NULL;
m_p_search_tree = nullptr;
m_search_tree_constructed = false;
}
}
Expand Down Expand Up @@ -607,8 +607,8 @@ namespace CGAL {
AABB_tree<Tr>::AABB_tree(const Tr& traits)
: m_traits(traits)
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_p_root_node(nullptr)
, m_p_search_tree(nullptr)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
Expand All @@ -621,8 +621,8 @@ namespace CGAL {
T&& ... t)
: m_traits()
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_p_root_node(nullptr)
, m_p_search_tree(nullptr)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
Expand Down Expand Up @@ -687,10 +687,10 @@ namespace CGAL {

// allocates tree nodes
m_p_root_node = new Node[m_primitives.size()-1]();
if(m_p_root_node == NULL)
if(m_p_root_node == nullptr)
{
std::cerr << "Unable to allocate memory for AABB tree" << std::endl;
CGAL_assertion(m_p_root_node != NULL);
CGAL_assertion(m_p_root_node != nullptr);
m_primitives.clear();
clear();
}
Expand Down Expand Up @@ -738,7 +738,7 @@ namespace CGAL {
{
m_p_search_tree = new Search_tree(first, beyond);
m_default_search_tree_constructed = true;
if(m_p_search_tree != NULL)
if(m_p_search_tree != nullptr)
{
m_search_tree_constructed = true;
return true;
Expand Down
4 changes: 2 additions & 2 deletions AABB_tree/include/CGAL/internal/AABB_tree/AABB_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class AABB_node
/// Constructor
AABB_node()
: m_bbox()
, m_p_left_child(NULL)
, m_p_right_child(NULL) { };
, m_p_left_child(nullptr)
, m_p_right_child(nullptr) { };

/// Non virtual Destructor
/// Do not delete children because the tree hosts and delete them
Expand Down
4 changes: 2 additions & 2 deletions AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace CGAL
public:
template <class ConstPointIterator>
AABB_search_tree(ConstPointIterator begin, ConstPointIterator beyond)
: m_p_tree(NULL)
: m_p_tree(nullptr)
{
typedef typename Add_decorated_point<Traits, typename Traits::Primitive::Id>::Point_3 Decorated_point;
std::vector<Decorated_point> points;
Expand All @@ -117,7 +117,7 @@ namespace CGAL
++begin;
}
m_p_tree = new Tree(points.begin(), points.end());
if(m_p_tree != NULL)
if(m_p_tree != nullptr)
m_p_tree->build();
else
std::cerr << "unable to build the search tree!" << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ struct Cstr_shared_data<Graph, Base, ObjectPropertyMap, PointPropertyMap, ::CGAL
typedef void* Shared_data;
static Shared_data construct_shared_data(Graph&)
{
return NULL;
return nullptr;
}

template <class VertexPmap>
static Shared_data construct_shared_data(Graph&, VertexPmap)
{
return NULL;
return nullptr;
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace CGAL {
}

Advancing_front_surface_reconstruction_boundary_iterator(const Surface& S_)
: S(S_), pos(NULL)
: S(S_), pos(nullptr)
{}

Advancing_front_surface_reconstruction_boundary_iterator(const Self& s)
Expand All @@ -108,7 +108,7 @@ namespace CGAL {

Self operator++()
{
if(pos == NULL) {
if(pos == nullptr) {
return *this;
}
if(first){
Expand All @@ -134,7 +134,7 @@ namespace CGAL {

void advance_on_boundary()
{
if(pos == NULL) {
if(pos == nullptr) {
return;
}
pos = pos->first_incident()->first;
Expand All @@ -143,7 +143,7 @@ namespace CGAL {

void advance_to_next_boundary()
{
if(pos == NULL) {
if(pos == nullptr) {
return;
}
do {
Expand All @@ -157,7 +157,7 @@ namespace CGAL {
CGAL_assertion(pos->is_on_border());

} else {
pos = NULL;
pos = nullptr;
}
}
};
Expand Down Expand Up @@ -400,18 +400,18 @@ namespace CGAL {

Intern_successors_type* ret = &ist_pool.back();

ret->first->first = NULL;
ret->second->first = NULL;
ret->first->first = nullptr;
ret->second->first = nullptr;
return ret;
}


inline bool is_on_border(Vertex_handle vh, const int& i) const
{
if (vh->m_incident_border == NULL) return false; //vh is interior
if (vh->m_incident_border->first->first != NULL)
if (vh->m_incident_border == nullptr) return false; //vh is interior
if (vh->m_incident_border->first->first != nullptr)
{
if (vh->m_incident_border->second->first != NULL)
if (vh->m_incident_border->second->first != nullptr)
return ((vh->m_incident_border->first->second.second == i)||
(vh->m_incident_border->second->second.second == i));
return (vh->m_incident_border->first->second.second == i);
Expand All @@ -422,28 +422,28 @@ namespace CGAL {

void remove_border_edge(Vertex_handle w, Vertex_handle v)
{
if (w->m_incident_border != NULL)
if (w->m_incident_border != nullptr)
{
if (w->m_incident_border->second->first == v)
{
w->m_incident_border->second->first = NULL;
w->m_incident_border->second->first = nullptr;
set_interior_edge(w,v);
return;
}
if (w->m_incident_border->first->first == v)
{
if (w->m_incident_border->second->first != NULL)
if (w->m_incident_border->second->first != nullptr)
{
Next_border_elt* tmp = w->m_incident_border->first;
w->m_incident_border->first = w->m_incident_border->second;
w->m_incident_border->second = tmp;
w->m_incident_border->second->first = NULL;
w->m_incident_border->second->first = nullptr;
set_interior_edge(w,v);
return;
}
else
{
w->m_incident_border->first->first = NULL;
w->m_incident_border->first->first = nullptr;
set_interior_edge(w,v);
return;
}
Expand Down Expand Up @@ -571,7 +571,7 @@ namespace CGAL {

void re_init(Vertex_handle w)
{
if (w->m_incident_border != NULL)
if (w->m_incident_border != nullptr)
{
w->delete_border();
}
Expand Down Expand Up @@ -629,7 +629,7 @@ namespace CGAL {

void clear_vertex(Vertex_handle w)
{
if (w->m_incident_border != NULL)
if (w->m_incident_border != nullptr)
{
w->delete_border();
}
Expand Down Expand Up @@ -956,14 +956,14 @@ namespace CGAL {
bool is_border_elt(Edge_like& key, Border_elt& result) const
{
Next_border_elt* it12 = border_elt(key.first, key.second);
if (it12 != NULL)
if (it12 != nullptr)
{
result = it12->second;
return true;
}

Next_border_elt* it21 = border_elt(key.second, key.first);
if (it21 != NULL)
if (it21 != nullptr)
{
result = it21->second;
std::swap(key.first, key.second);
Expand All @@ -975,13 +975,13 @@ namespace CGAL {
//---------------------------------------------------------------------
bool is_border_elt(Edge_like& key) const {
Next_border_elt* it12 = border_elt(key.first, key.second);
if (it12 != NULL)
if (it12 != nullptr)
{
return true;
}

Next_border_elt* it21 = border_elt(key.second, key.first);
if (it21 != NULL)
if (it21 != nullptr)
{
std::swap(key.first, key.second);
return true;
Expand All @@ -993,7 +993,7 @@ namespace CGAL {
bool is_ordered_border_elt(const Edge_like& key, Border_elt& result) const
{
Next_border_elt* it12 = border_elt(key.first, key.second);
if (it12 != NULL)
if (it12 != nullptr)
{
result = it12->second;
return true;
Expand All @@ -1015,7 +1015,7 @@ namespace CGAL {
Vertex_handle v1 = e.first;

Next_border_elt* it12 = border_elt(v1, e.second);
if (it12 != NULL)
if (it12 != nullptr)
{
ptr = &it12->second.first.second;
return true;
Expand Down Expand Up @@ -1047,7 +1047,7 @@ namespace CGAL {

coord_type lazy_squared_radius(const Cell_handle& c)
{
if (c->lazy_squared_radius() != NULL)
if (c->lazy_squared_radius() != nullptr)
return *(c->lazy_squared_radius());

c->set_lazy_squared_radius
Expand All @@ -1060,7 +1060,7 @@ namespace CGAL {

Point lazy_circumcenter(const Cell_handle& c)
{
if (c->lazy_circumcenter() != NULL)
if (c->lazy_circumcenter() != nullptr)
return *(c->lazy_circumcenter());

c->set_lazy_circumcenter
Expand Down
Loading

0 comments on commit 4581f1b

Please sign in to comment.