diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h
index b57f0260a05..9a05e1068a4 100644
--- a/AABB_tree/include/CGAL/AABB_tree.h
+++ b/AABB_tree/include/CGAL/AABB_tree.h
@@ -487,7 +487,7 @@ public:
if( size() > 1 ) {
delete [] m_p_root_node;
}
- m_p_root_node = NULL;
+ m_p_root_node = nullptr;
}
// clears internal KD tree
@@ -495,9 +495,9 @@ public:
{
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;
}
}
@@ -607,8 +607,8 @@ public:
AABB_tree
::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)
@@ -621,8 +621,8 @@ public:
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)
@@ -687,10 +687,10 @@ public:
// 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();
}
@@ -738,7 +738,7 @@ public:
{
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;
diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_node.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_node.h
index 5d0cf5ce4d2..c8f85e6505a 100644
--- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_node.h
+++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_node.h
@@ -47,8 +47,8 @@ public:
/// 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
diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h
index 214a8d2644a..09e9ec8a058 100644
--- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h
+++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h
@@ -107,7 +107,7 @@ namespace CGAL
public:
template
AABB_search_tree(ConstPointIterator begin, ConstPointIterator beyond)
- : m_p_tree(NULL)
+ : m_p_tree(nullptr)
{
typedef typename Add_decorated_point::Point_3 Decorated_point;
std::vector points;
@@ -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;
diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h b/AABB_tree/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h
index 0c4641b64d8..1096d248244 100644
--- a/AABB_tree/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h
+++ b/AABB_tree/include/CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h
@@ -66,13 +66,13 @@ struct Cstr_shared_data
static Shared_data construct_shared_data(Graph&, VertexPmap)
{
- return NULL;
+ return nullptr;
}
};
diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
index 926c95c41b1..aec4398cdfd 100644
--- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
+++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
@@ -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)
@@ -108,7 +108,7 @@ namespace CGAL {
Self operator++()
{
- if(pos == NULL) {
+ if(pos == nullptr) {
return *this;
}
if(first){
@@ -134,7 +134,7 @@ namespace CGAL {
void advance_on_boundary()
{
- if(pos == NULL) {
+ if(pos == nullptr) {
return;
}
pos = pos->first_incident()->first;
@@ -143,7 +143,7 @@ namespace CGAL {
void advance_to_next_boundary()
{
- if(pos == NULL) {
+ if(pos == nullptr) {
return;
}
do {
@@ -157,7 +157,7 @@ namespace CGAL {
CGAL_assertion(pos->is_on_border());
} else {
- pos = NULL;
+ pos = nullptr;
}
}
};
@@ -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);
@@ -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;
}
@@ -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();
}
@@ -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();
}
@@ -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);
@@ -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;
@@ -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;
@@ -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;
@@ -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
@@ -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
diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h
index eac9e519d77..1422a55e0fc 100644
--- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h
+++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h
@@ -75,9 +75,9 @@ namespace CGAL {
Advancing_front_surface_reconstruction_cell_base_3()
: Cb(),
- _smallest_radius_facet_tab(NULL), selected_facet(0)
+ _smallest_radius_facet_tab(nullptr), selected_facet(0)
#ifdef AFSR_LAZY
- , _circumcenter(NULL), _squared_radius(NULL)
+ , _circumcenter(nullptr), _squared_radius(nullptr)
#endif
{
#ifdef AFSR_FACET_NUMBER
@@ -89,9 +89,9 @@ namespace CGAL {
Advancing_front_surface_reconstruction_cell_base_3(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
: Cb( v0, v1, v2, v3),
- _smallest_radius_facet_tab(NULL), selected_facet(0)
+ _smallest_radius_facet_tab(nullptr), selected_facet(0)
#ifdef AFSR_LAZY
- , _circumcenter(NULL), _squared_radius(NULL)
+ , _circumcenter(nullptr), _squared_radius(nullptr)
#endif
{
#ifdef FACET_NUMBER
@@ -105,9 +105,9 @@ namespace CGAL {
Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
: Cb(v0, v1, v2, v3,
n0, n1, n2, n3),
- _smallest_radius_facet_tab(NULL), selected_facet(0)
+ _smallest_radius_facet_tab(nullptr), selected_facet(0)
#ifdef AFSR_LAZY
- , _circumcenter(NULL), _squared_radius(NULL)
+ , _circumcenter(nullptr), _squared_radius(nullptr)
#endif
{
#ifdef AFSR_FACET_NUMBER
@@ -121,12 +121,12 @@ namespace CGAL {
inline ~Advancing_front_surface_reconstruction_cell_base_3()
{
- if (_smallest_radius_facet_tab != NULL)
+ if (_smallest_radius_facet_tab != nullptr)
delete[] _smallest_radius_facet_tab;
#ifdef AFSR_LAZY
- if (_circumcenter != NULL)
+ if (_circumcenter != nullptr)
delete _circumcenter;
- if (_squared_radius != NULL)
+ if (_squared_radius != nullptr)
delete _squared_radius;
#endif
}
@@ -136,31 +136,31 @@ namespace CGAL {
inline void clear()
{
- if (_smallest_radius_facet_tab != NULL)
+ if (_smallest_radius_facet_tab != nullptr)
delete[] _smallest_radius_facet_tab;
- _smallest_radius_facet_tab = NULL;
+ _smallest_radius_facet_tab = nullptr;
selected_facet = 0;
#ifdef AFSR_LAZY
- if (_circumcenter != NULL)
+ if (_circumcenter != nullptr)
delete _circumcenter;
- _circumcenter = NULL;
- if (_squared_radius != NULL)
+ _circumcenter = nullptr;
+ if (_squared_radius != nullptr)
delete _squared_radius;
- _squared_radius = NULL;
+ _squared_radius = nullptr;
#endif
}
//-------------------------------------------------------------------
inline coord_type smallest_radius(const int& i)
{
- if (_smallest_radius_facet_tab == NULL)
+ if (_smallest_radius_facet_tab == nullptr)
return -1;
return _smallest_radius_facet_tab[i];
}
inline void set_smallest_radius(const int& i, const coord_type& c)
{
- if (_smallest_radius_facet_tab == NULL)
+ if (_smallest_radius_facet_tab == nullptr)
{
_smallest_radius_facet_tab = new coord_type[4];
for(int i = 0; i < 4; i++)
@@ -172,7 +172,7 @@ namespace CGAL {
// pour un controle de l'allocation memoire... utile???
inline bool alloc_smallest_radius_tab(coord_type* ptr)
{
- if (_smallest_radius_facet_tab==NULL)
+ if (_smallest_radius_facet_tab==nullptr)
{
_smallest_radius_facet_tab = ptr;
return true;
diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
index 050e14036fd..2a1f05a69e2 100644
--- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
+++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
@@ -174,20 +174,20 @@ namespace CGAL {
void delete_border()
{
- m_incident_border = NULL;
+ m_incident_border = nullptr;
}
inline Next_border_elt* next_on_border(const int& i) const
{
- if (m_incident_border == NULL) return NULL; //vh is interior
- if (m_incident_border->first->first != NULL)
+ if (m_incident_border == nullptr) return nullptr; //vh is interior
+ if (m_incident_border->first->first != nullptr)
if (m_incident_border->first->second.second == i)
return m_incident_border->first;
- if (m_incident_border->second->first != NULL)
+ if (m_incident_border->second->first != nullptr)
if (m_incident_border->second->second.second == i)
return m_incident_border->second;
- return NULL;
+ return nullptr;
}
@@ -195,40 +195,40 @@ namespace CGAL {
inline bool is_border_edge(Vertex_handle v) const
{
- if (m_incident_border == NULL) return false;
+ if (m_incident_border == nullptr) return false;
return ((m_incident_border->first->first == v)||
(m_incident_border->second->first == v));
}
inline Next_border_elt* border_elt(Vertex_handle v) const
{
- if (m_incident_border == NULL) return NULL;
+ if (m_incident_border == nullptr) return nullptr;
if (m_incident_border->first->first == v) return m_incident_border->first;
if (m_incident_border->second->first == v) return m_incident_border->second;
- return NULL;
+ return nullptr;
}
public:
inline Next_border_elt* first_incident() const
{
- if (m_incident_border == NULL) return NULL;
+ if (m_incident_border == nullptr) return nullptr;
return m_incident_border->first;
}
private:
inline Next_border_elt* second_incident() const
{
- if (m_incident_border == NULL) return NULL;
+ if (m_incident_border == nullptr) return nullptr;
return m_incident_border->second;
}
inline void set_next_border_elt(const Next_border_elt& elt)
{
- if (m_incident_border->first->first == NULL)
+ if (m_incident_border->first->first == nullptr)
*m_incident_border->first = elt;
else
{
- if (m_incident_border->second->first != NULL)
+ if (m_incident_border->second->first != nullptr)
std::cerr << "+++probleme de MAJ du bord " << std::endl;
*m_incident_border->second = elt;
}
diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h
index 1a7649fe88f..f0d48f20bca 100644
--- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h
+++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h
@@ -417,7 +417,7 @@ void test_algebraic_structure_intern(
assert( a != AS (0));
assert( b != AS (0));
assert( c != AS (0));
- // AS (0) == NULL of IntegralDomain
+ // AS (0) == nullptr of IntegralDomain
assert(a* AS (0)== AS (0));
assert(a+ AS (0)==a);
assert(b* AS (0)== AS (0));
diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h
index ffb887580a3..9f940860783 100644
--- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h
+++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h
@@ -1333,7 +1333,7 @@ Alpha_shape_2::number_of_solid_components(const Type_of_alpha& alpha) c
++face_it)
{
Face_handle pFace = face_it;
- CGAL_triangulation_postcondition( pFace != NULL);
+ CGAL_triangulation_postcondition( pFace != nullptr);
if (classify(pFace, alpha) == INTERIOR){
Data& data = marked_face_set[pFace];
@@ -1367,7 +1367,7 @@ Alpha_shape_2::traverse(const Face_handle& pFace,
for (int i=0; i<3; i++)
{
pNeighbor = fh->neighbor(i);
- CGAL_triangulation_assertion(pNeighbor != NULL);
+ CGAL_triangulation_assertion(pNeighbor != nullptr);
if (classify(pNeighbor, alpha) == INTERIOR){
Data& data = marked_face_set[pNeighbor];
if(data == false){
diff --git a/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h
index eb2aabbf0d6..a00fc3d1197 100644
--- a/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h
+++ b/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h
@@ -260,26 +260,26 @@ public:
: exact_(Exact_nt(0)), approx_(0)
{
data().nbpts=0;
- data().p0=NULL;
- data().p1=NULL;
- data().p2=NULL;
+ data().p0=nullptr;
+ data().p1=nullptr;
+ data().p2=nullptr;
}
Lazy_alpha_nt_2(double d)
: exact_(Exact_nt(d)), approx_(d)
{
data().nbpts=0;
- data().p0=NULL;
- data().p1=NULL;
- data().p2=NULL;
+ data().p0=nullptr;
+ data().p1=nullptr;
+ data().p2=nullptr;
}
Lazy_alpha_nt_2(const Input_point& wp0)
{
data().nbpts=1;
data().p0=&wp0;
- data().p1=NULL;
- data().p2=NULL;
+ data().p1=nullptr;
+ data().p2=nullptr;
set_approx();
}
@@ -289,7 +289,7 @@ public:
data().nbpts=2;
data().p0=&wp0;
data().p1=&wp1;
- data().p2=NULL;
+ data().p2=nullptr;
set_approx();
}
diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h
index a2d5dc0df3d..0a5aff40030 100644
--- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h
+++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h
@@ -1731,7 +1731,7 @@ Alpha_shape_3::number_of_solid_components(const NT& alpha) const
for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it)
{
Cell_handle pCell = cell_it;
- CGAL_triangulation_assertion(pCell != NULL);
+ CGAL_triangulation_assertion(pCell != nullptr);
if (classify(pCell, alpha) == INTERIOR){
Data& data = marked_cell_set[pCell];
@@ -1763,7 +1763,7 @@ void Alpha_shape_3::traverse(Cell_handle pCell,
for (int i=0; i<=3; i++)
{
pNeighbor = pCell->neighbor(i);
- CGAL_triangulation_assertion(pNeighbor != NULL);
+ CGAL_triangulation_assertion(pNeighbor != nullptr);
if (classify(pNeighbor, alpha) == INTERIOR){
Data& data = marked_cell_set[pNeighbor];
if(data == false){
diff --git a/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h
index 3a0ffedc88e..33bfa44384d 100644
--- a/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h
+++ b/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h
@@ -253,29 +253,29 @@ public:
: exact_(Exact_nt(0)),approx_(0)
{
data().nbpts=0;
- data().p0=NULL;
- data().p1=NULL;
- data().p2=NULL;
- data().p3=NULL;
+ data().p0=nullptr;
+ data().p1=nullptr;
+ data().p2=nullptr;
+ data().p3=nullptr;
}
Lazy_alpha_nt_3(double d)
: exact_(Exact_nt(d)),approx_(d)
{
data().nbpts=0;
- data().p0=NULL;
- data().p1=NULL;
- data().p2=NULL;
- data().p3=NULL;
+ data().p0=nullptr;
+ data().p1=nullptr;
+ data().p2=nullptr;
+ data().p3=nullptr;
}
Lazy_alpha_nt_3(const Input_point& wp1)
{
data().nbpts=1;
data().p0=&wp1;
- data().p1=NULL;
- data().p2=NULL;
- data().p3=NULL;
+ data().p1=nullptr;
+ data().p2=nullptr;
+ data().p3=nullptr;
set_approx();
}
@@ -285,8 +285,8 @@ public:
data().nbpts=2;
data().p0=&wp1;
data().p1=&wp2;
- data().p2=NULL;
- data().p3=NULL;
+ data().p2=nullptr;
+ data().p3=nullptr;
set_approx();
}
@@ -298,7 +298,7 @@ public:
data().p0=&wp1;
data().p1=&wp2;
data().p2=&wp3;
- data().p3=NULL;
+ data().p3=nullptr;
set_approx();
}
diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/Concepts/ApolloniusGraphHierarchyVertexBase_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/Concepts/ApolloniusGraphHierarchyVertexBase_2.h
index 06edc249596..2d769d3d9e8 100644
--- a/Apollonius_graph_2/doc/Apollonius_graph_2/Concepts/ApolloniusGraphHierarchyVertexBase_2.h
+++ b/Apollonius_graph_2/doc/Apollonius_graph_2/Concepts/ApolloniusGraphHierarchyVertexBase_2.h
@@ -63,7 +63,7 @@ ApolloniusGraphHierarchyVertexBase_2(Site_2 s, Face_handle f).;
/*!
Returns a handle to the corresponding
vertex of the next level Apollonius graph. If such a vertex does not
-exist `Vertex_handle(NULL)` is returned.
+exist `Vertex_handle(nullptr)` is returned.
*/
Vertex_handle up();
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h
index c8a8b03197b..f39f30562d7 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h
@@ -72,7 +72,7 @@ bool is_unbounded() const;
/*!
returns an incident halfedge along the outer boundary of the face.
-If `f` has no outer boundary, the function returns `NULL`.
+If `f` has no outer boundary, the function returns `nullptr`.
*/
Halfedge* halfedge();
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h
index 5ca8cb4460c..e39ee8c95e5 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h
@@ -102,7 +102,7 @@ void read_arrangement_end ();
/*!
reads a size value, which is supposed to be preceded by the given label.
*/
-Size read_size (const char *label = NULL);
+Size read_size (const char *label = nullptr);
/*!
reads a message indicating the beginning of the vertex records.
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h
index 8372ecb4e6c..849c408572d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h
@@ -167,8 +167,8 @@ public:
delete p_cache;
delete p_inter_map;
}
- p_cache = NULL;
- p_inter_map = NULL;
+ p_cache = nullptr;
+ p_inter_map = nullptr;
}
//@}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h
index 376219eb76e..b58fac48103 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h
@@ -167,7 +167,7 @@ public:
DHalfedge* he = p_arr->_locate_around_vertex(p_arr->_vertex (vh), cv, ind);
- CGAL_assertion(he != NULL);
+ CGAL_assertion(he != nullptr);
return (p_arr->_handle_for (he));
}
@@ -198,7 +198,7 @@ public:
DHalfedge* he = p_arr->topology_traits()->
locate_around_boundary_vertex(p_arr->_vertex (vh), cv, ind, ps_x, ps_y);
- CGAL_assertion(he != NULL);
+ CGAL_assertion(he != nullptr);
return (p_arr->_handle_for (he));
}
@@ -219,10 +219,10 @@ public:
if (he1 == he2) return (0);
- const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
- const DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
- const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
- const DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
+ const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
+ const DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
+ const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
+ const DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
if ((oc1 != oc2) || (ic1 != ic2)) return (-1);
@@ -305,7 +305,7 @@ public:
Vertex_handle create_vertex(const Point_2& p)
{
DVertex* v = p_arr->_create_vertex (p);
- CGAL_assertion(v != NULL);
+ CGAL_assertion(v != nullptr);
return (p_arr->_handle_for (v));
}
@@ -328,7 +328,7 @@ public:
{
DVertex* v = p_arr->_create_boundary_vertex (cv, ind, ps_x, ps_y);
- CGAL_assertion(v != NULL);
+ CGAL_assertion(v != nullptr);
// Notify the topology traits on the creation of the boundary vertex.
if (notify)
@@ -359,7 +359,7 @@ public:
DVertex* v = p_arr->_place_and_set_curve_end(p_arr->_face (f), cv, ind,
ps_x, ps_y, &pred);
- if (pred == NULL)
+ if (pred == nullptr)
// No predecessor halfedge, return just the vertex:
return (std::make_pair(p_arr->_handle_for(v), Halfedge_handle()));
@@ -401,7 +401,7 @@ public:
new_face, swapped_predecessors,
allow_swap_of_predecessors);
- CGAL_assertion(he != NULL);
+ CGAL_assertion(he != nullptr);
return (p_arr->_handle_for(he));
}
@@ -438,7 +438,7 @@ public:
DHalfedge* he =
p_arr->_insert_from_vertex(p_arr->_halfedge(he_to), cv, cv_dir, p_v);
- CGAL_assertion(he != NULL);
+ CGAL_assertion(he != nullptr);
return (p_arr->_handle_for (he));
}
@@ -485,7 +485,7 @@ public:
DHalfedge* he = p_arr->_insert_in_face_interior(p_arr->_face (f),
cv, cv_dir, p_v1, p_v2);
- CGAL_assertion(he != NULL);
+ CGAL_assertion(he != nullptr);
return (p_arr->_handle_for (he));
}
@@ -613,7 +613,7 @@ public:
{
DHalfedge* he = p_arr->_split_edge (p_arr->_halfedge(e), p, cv1, cv2);
- CGAL_assertion(he != NULL);
+ CGAL_assertion(he != nullptr);
return (p_arr->_handle_for(he));
}
@@ -636,7 +636,7 @@ public:
DHalfedge* he = p_arr->_split_edge(p_arr->_halfedge(e), p_arr->_vertex(v),
cv1, cv2);
- CGAL_assertion (he != NULL);
+ CGAL_assertion (he != nullptr);
return (p_arr->_handle_for(he));
}
@@ -673,7 +673,7 @@ public:
{
DFace* f =
p_arr->_remove_edge(p_arr->_halfedge (e), remove_source, remove_target);
- CGAL_assertion(f != NULL);
+ CGAL_assertion(f != nullptr);
return (p_arr->_handle_for(f));
}
@@ -687,9 +687,9 @@ public:
{
DHalfedge* he1 = p_arr->_halfedge(e1);
DHalfedge* he2 = p_arr->_halfedge(e2);
- const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
- if (ic1 == NULL) return (false);
- const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
+ const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
+ if (ic1 == nullptr) return (false);
+ const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
return (ic1 == ic2);
}
@@ -703,9 +703,9 @@ public:
{
DHalfedge* he1 = p_arr->_halfedge(e1);
DHalfedge* he2 = p_arr->_halfedge(e2);
- const DOuter_ccb* oc1 = (he1->is_on_outer_ccb()) ? he1->outer_ccb() : NULL;
- if (oc1 == NULL) return (false);
- const DOuter_ccb* oc2 = (he2->is_on_outer_ccb()) ? he2->outer_ccb() : NULL;
+ const DOuter_ccb* oc1 = (he1->is_on_outer_ccb()) ? he1->outer_ccb() : nullptr;
+ if (oc1 == nullptr) return (false);
+ const DOuter_ccb* oc2 = (he2->is_on_outer_ccb()) ? he2->outer_ccb() : nullptr;
return (oc1 == oc2);
}
//@}
@@ -797,7 +797,7 @@ public:
/*!
* Create a new vertex.
- * \param p A pointer to the point (may be NULL in case of a vertex at
+ * \param p A pointer to the point (may be nullptr in case of a vertex at
* infinity).
* \param ps_x The boundary condition at x.
* \param ps_y The boundary condition at y.
@@ -807,14 +807,14 @@ public:
Arr_parameter_space ps_x, Arr_parameter_space ps_y)
{
Dcel_vertex* new_v = p_arr->_dcel().new_vertex();
- if (p != NULL) {
+ if (p != nullptr) {
typename Dcel::Vertex::Point* p_pt = p_arr->_new_point(*p);
new_v->set_point(p_pt);
}
else
{
CGAL_precondition (p_arr->is_open(ps_x, ps_y));
- new_v->set_point (NULL);
+ new_v->set_point (nullptr);
}
new_v->set_boundary (ps_x, ps_y);
@@ -823,7 +823,7 @@ public:
/*!
* Create a new edge (halfedge pair), associated with the given curve.
- * \param cv A pointer to the x-monotone curve (may be NULL in case of
+ * \param cv A pointer to the x-monotone curve (may be nullptr in case of
* a fictitious edge).
* \return A pointer to one of the created DCEL halfedge.
*/
@@ -831,11 +831,11 @@ public:
{
Dcel_halfedge* new_he = p_arr->_dcel().new_edge();
- if (cv != NULL) {
+ if (cv != nullptr) {
typename Dcel::Halfedge::X_monotone_curve* p_cv = p_arr->_new_curve(*cv);
new_he->set_curve(p_cv);
}
- else new_he->set_curve(NULL);
+ else new_he->set_curve(nullptr);
return new_he;
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h
index b48363c2913..447c74f1b52 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h
@@ -132,13 +132,13 @@ public:
/*! Default constructor. */
Arr_bounded_planar_topology_traits_2() :
Base(),
- unb_face(NULL)
+ unb_face(nullptr)
{}
/*! Constructor from a geometry-traits object. */
Arr_bounded_planar_topology_traits_2(const Gt2* traits) :
Base(traits),
- unb_face(NULL)
+ unb_face(nullptr)
{}
/*! Assign the contents of another topology-traits class. */
@@ -347,7 +347,7 @@ public:
Arr_parameter_space /* ps_y */) const
{
CGAL_error();
- return NULL;
+ return nullptr;
}
/*! Locate a DCEL feature that contains the given curve end.
@@ -379,7 +379,7 @@ public:
{
// This function should never be called:
CGAL_error();
- return NULL;
+ return nullptr;
}
/*! Determine whether the given face is unbounded.
@@ -406,7 +406,7 @@ public:
{
// This function should never be called:
CGAL_error();
- return NULL;
+ return nullptr;
}
//! reference_face (const version).
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
index 8ad09f033b8..fac702a13fc 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
@@ -137,13 +137,13 @@ public:
base_objects.begin(); it != base_objects.end(); ++it)
{
base_x_curve = object_cast(&(*it));
- if (base_x_curve != NULL) {
+ if (base_x_curve != nullptr) {
// Current object is an x-monotone curve: Attach data to it.
*oi++ = make_object(X_monotone_curve_2(*base_x_curve, xdata));
}
else {
// Current object is an isolated point: Leave it as is.
- CGAL_assertion(object_cast(&(*it)) != NULL);
+ CGAL_assertion(object_cast(&(*it)) != nullptr);
*oi++ = *it;
}
}
@@ -219,7 +219,7 @@ public:
for (typename std::list::const_iterator it =
base_objects.begin(); it != base_objects.end(); ++it)
{
- if ((base_cv = object_cast(&(*it))) != NULL) {
+ if ((base_cv = object_cast(&(*it))) != nullptr) {
// The current intersection object is an overlapping x-monotone
// curve: Merge the data fields of both intersecting curves and
// associate the result with the overlapping curve.
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h
index 41adeb99168..ffd43ec6bbf 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h
@@ -92,31 +92,31 @@ protected:
public:
/*! Default constructor. */
Arr_vertex_base() :
- p_inc(NULL),
- p_pt(NULL)
+ p_inc(nullptr),
+ p_pt(nullptr)
{ pss[0] = pss[1] = static_cast(CGAL::ARR_INTERIOR); }
/*! Destructor. */
virtual ~Arr_vertex_base() {}
- /*! Check if the point pointer is NULL. */
- bool has_null_point() const { return (p_pt == NULL); }
+ /*! Check if the point pointer is nullptr. */
+ bool has_null_point() const { return (p_pt == nullptr); }
/*! Get the point (const version). */
const Point& point() const
{
- CGAL_assertion(p_pt != NULL);
+ CGAL_assertion(p_pt != nullptr);
return (*p_pt);
}
/*! Get the point (non-const version). */
Point& point()
{
- CGAL_assertion(p_pt != NULL);
+ CGAL_assertion(p_pt != nullptr);
return (*p_pt);
}
- /*! Set the point (may be a NULL point). */
+ /*! Set the point (may be a nullptr point). */
void set_point(Point* p) { p_pt = p; }
/*! Get the boundary type in x. */
@@ -175,31 +175,31 @@ protected:
public:
/*! Default constructor */
Arr_halfedge_base() :
- p_opp(NULL),
- p_prev(NULL),
- p_next(NULL),
- p_v(NULL),
- p_comp(NULL),
- p_cv(NULL)
+ p_opp(nullptr),
+ p_prev(nullptr),
+ p_next(nullptr),
+ p_v(nullptr),
+ p_comp(nullptr),
+ p_cv(nullptr)
{}
/*! Destructor. */
virtual ~Arr_halfedge_base() {}
- /*! Check if the curve pointer is NULL. */
- bool has_null_curve() const { return (p_cv == NULL); }
+ /*! Check if the curve pointer is nullptr. */
+ bool has_null_curve() const { return (p_cv == nullptr); }
/*! Get the x-monotone curve (const version). */
const X_monotone_curve& curve() const
{
- CGAL_precondition(p_cv != NULL);
+ CGAL_precondition(p_cv != nullptr);
return (*p_cv);
}
/*! Get the x-monotone curve (non-const version). */
X_monotone_curve& curve()
{
- CGAL_precondition(p_cv != NULL);
+ CGAL_precondition(p_cv != nullptr);
return (*p_cv);
}
@@ -712,7 +712,7 @@ private:
public:
/*! Default constructor. */
- Arr_outer_ccb() : p_f(NULL), iter_is_not_singular(false) {}
+ Arr_outer_ccb() : p_f(nullptr), iter_is_not_singular(false) {}
/*! Copy constructor. */
Arr_outer_ccb(const Arr_outer_ccb& other) :
@@ -778,7 +778,7 @@ private:
public:
/*! Default constructor. */
- Arr_inner_ccb() : p_f(NULL), iter_is_not_singular(false) {}
+ Arr_inner_ccb() : p_f(nullptr), iter_is_not_singular(false) {}
/*! Copy constructor. */
Arr_inner_ccb(const Arr_inner_ccb& other) :
@@ -843,7 +843,7 @@ private:
public:
/*! Default constructor. */
- Arr_isolated_vertex() : p_f(NULL), iter_is_not_singular(false) {}
+ Arr_isolated_vertex() : p_f(nullptr), iter_is_not_singular(false) {}
/*! Copy constructor. */
Arr_isolated_vertex(const Arr_isolated_vertex& other) :
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
index 178274c81d6..21914ce4c63 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
@@ -117,10 +117,10 @@ public:
/*! Default constructor. */
_Bezier_curve_2_rep () :
_no_self_inter (true),
- p_polyX(NULL),
- p_normX(NULL),
- p_polyY(NULL),
- p_normY(NULL)
+ p_polyX(nullptr),
+ p_normX(nullptr),
+ p_polyY(nullptr),
+ p_normY(nullptr)
{}
/*! Copy constructor (isn't really used). */
@@ -128,18 +128,18 @@ public:
_ctrl_pts(other._ctrl_pts),
_bbox(other._bbox),
_no_self_inter(other._no_self_inter),
- p_polyX(NULL),
- p_normX(NULL),
- p_polyY(NULL),
- p_normY(NULL)
+ p_polyX(nullptr),
+ p_normX(nullptr),
+ p_polyY(nullptr),
+ p_normY(nullptr)
{
- if (other.p_polyX != NULL)
+ if (other.p_polyX != nullptr)
p_polyX = new Polynomial(*(other.p_polyX));
- if (other.p_polyY != NULL)
+ if (other.p_polyY != nullptr)
p_polyY = new Polynomial(*(other.p_polyY));
- if (other.p_normX != NULL)
+ if (other.p_normX != nullptr)
p_normX = new Integer(*(other.p_normX));
- if (other.p_normY != NULL)
+ if (other.p_normY != nullptr)
p_normY = new Integer(*(other.p_normY));
}
@@ -152,10 +152,10 @@ public:
*/
template
_Bezier_curve_2_rep (InputIterator pts_begin, InputIterator pts_end) :
- p_polyX(NULL),
- p_normX(NULL),
- p_polyY(NULL),
- p_normY(NULL)
+ p_polyX(nullptr),
+ p_normX(nullptr),
+ p_polyY(nullptr),
+ p_normY(nullptr)
{
// Copy the control points and compute their bounding box.
const int pts_size = static_cast(std::distance (pts_begin, pts_end));
@@ -218,13 +218,13 @@ public:
/*! Destructor. */
~_Bezier_curve_2_rep ()
{
- if (p_polyX != NULL)
+ if (p_polyX != nullptr)
delete p_polyX;
- if (p_normX != NULL)
+ if (p_normX != nullptr)
delete p_normX;
- if (p_polyY != NULL)
+ if (p_polyY != nullptr)
delete p_polyY;
- if (p_normY != NULL)
+ if (p_normY != nullptr)
delete p_normY;
}
@@ -234,14 +234,14 @@ public:
/*! Check if the polynomials are already constructed. */
bool has_polynomials () const
{
- return (p_polyX != NULL && p_normX != NULL &&
- p_polyY != NULL && p_normY != NULL);
+ return (p_polyX != nullptr && p_normX != nullptr &&
+ p_polyY != nullptr && p_normY != nullptr);
}
/*! Get the polynomial X(t). */
const Polynomial& x_polynomial () const
{
- if (p_polyX == NULL)
+ if (p_polyX == nullptr)
_construct_polynomials ();
return (*p_polyX);
@@ -250,7 +250,7 @@ public:
/*! Get the normalizing factor for X(t). */
const Integer& x_norm () const
{
- if (p_normX == NULL)
+ if (p_normX == nullptr)
_construct_polynomials ();
return (*p_normX);
@@ -259,7 +259,7 @@ public:
/*! Get the polynomial Y(t). */
const Polynomial& y_polynomial () const
{
- if (p_polyY == NULL)
+ if (p_polyY == nullptr)
_construct_polynomials ();
return (*p_polyY);
@@ -268,7 +268,7 @@ public:
/*! Get the normalizing factor for Y(t). */
const Integer& y_norm () const
{
- if (p_normY == NULL)
+ if (p_normY == nullptr)
_construct_polynomials ();
return (*p_normY);
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h
index 668dac17b34..c17e8650e6a 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h
@@ -108,7 +108,7 @@ private:
Originator (const Curve_2& c, const Algebraic& t) :
_curve (c),
_xid (0),
- p_t (NULL)
+ p_t (nullptr)
{
set_parameter (t);
}
@@ -118,7 +118,7 @@ private:
const Algebraic& t) :
_curve (c),
_xid (xid),
- p_t (NULL)
+ p_t (nullptr)
{
set_parameter (t);
}
@@ -128,7 +128,7 @@ private:
_curve (c),
_xid (0),
_bpb (bpb),
- p_t (NULL)
+ p_t (nullptr)
{}
/*! Constructor with bounding information and no exact representation. */
@@ -137,7 +137,7 @@ private:
_curve (c),
_xid (xid),
_bpb (bpb),
- p_t (NULL)
+ p_t (nullptr)
{}
/*! Copy constructor. */
@@ -145,17 +145,17 @@ private:
_curve (other._curve),
_xid (other._xid),
_bpb (other._bpb),
- p_t (NULL)
+ p_t (nullptr)
{
// Deep copy of lazy instantiation
- if (other.p_t != NULL)
+ if (other.p_t != nullptr)
p_t = new Algebraic (*(other.p_t));
}
/*! Destructor. */
~Originator()
{
- if (p_t != NULL)
+ if (p_t != nullptr)
delete p_t;
}
@@ -167,9 +167,9 @@ private:
return (*this);
// Free memory, if necessary.
- if (p_t != NULL)
+ if (p_t != nullptr)
delete p_t;
- p_t = NULL;
+ p_t = nullptr;
// Copy the data members.
_curve = other._curve;
@@ -177,7 +177,7 @@ private:
_bpb = other._bpb;
// Deep copy of lazy instantiation
- if (other.p_t != NULL)
+ if (other.p_t != nullptr)
p_t = new Algebraic (*(other.p_t));
return (*this);
@@ -211,7 +211,7 @@ private:
/*! Check if the algberaic parameter is available. */
bool has_parameter () const
{
- return (p_t != NULL);
+ return (p_t != nullptr);
}
/*!
@@ -220,7 +220,7 @@ private:
*/
const Algebraic& parameter () const
{
- CGAL_precondition (p_t != NULL);
+ CGAL_precondition (p_t != nullptr);
return (*p_t);
}
@@ -230,7 +230,7 @@ private:
*/
void set_parameter (const Algebraic& t)
{
- CGAL_precondition (p_t == NULL);
+ CGAL_precondition (p_t == nullptr);
p_t = new Algebraic (t);
@@ -305,28 +305,28 @@ public:
/*! Default constructor. */
_Bezier_point_2_rep () :
- p_alg_x (NULL),
- p_rat_x (NULL),
- p_alg_y (NULL),
- p_rat_y (NULL)
+ p_alg_x (nullptr),
+ p_rat_x (nullptr),
+ p_alg_y (nullptr),
+ p_rat_y (nullptr)
{}
/*! Copy constructor. */
_Bezier_point_2_rep (const Self& pt) :
- p_alg_x (NULL),
- p_rat_x (NULL),
- p_alg_y (NULL),
- p_rat_y (NULL),
+ p_alg_x (nullptr),
+ p_rat_x (nullptr),
+ p_alg_y (nullptr),
+ p_rat_y (nullptr),
_origs (pt._origs),
_bbox (pt._bbox)
{
- if (pt.p_alg_x != NULL)
+ if (pt.p_alg_x != nullptr)
p_alg_x = new Algebraic (*(pt.p_alg_x));
- if (pt.p_rat_x != NULL)
+ if (pt.p_rat_x != nullptr)
p_rat_x = new Rational (*(pt.p_rat_x));
- if (pt.p_alg_y != NULL)
+ if (pt.p_alg_y != nullptr)
p_alg_y = new Algebraic (*(pt.p_alg_y));
- if (pt.p_rat_y != NULL)
+ if (pt.p_rat_y != nullptr)
p_rat_y = new Rational (*(pt.p_rat_y));
}
@@ -336,8 +336,8 @@ public:
* \param y The exact y-coordinate.
*/
_Bezier_point_2_rep (const Algebraic& x, const Algebraic& y, bool) :
- p_rat_x (NULL),
- p_rat_y (NULL)
+ p_rat_x (nullptr),
+ p_rat_y (nullptr)
{
p_alg_x = new Algebraic (x);
p_alg_y = new Algebraic (y);
@@ -407,13 +407,13 @@ public:
/*! Destructor. */
~_Bezier_point_2_rep ()
{
- if (p_rat_x != NULL)
+ if (p_rat_x != nullptr)
delete p_rat_x;
- if (p_alg_x != NULL)
+ if (p_alg_x != nullptr)
delete p_alg_x;
- if (p_rat_y != NULL)
+ if (p_rat_y != nullptr)
delete p_rat_y;
- if (p_alg_y != NULL)
+ if (p_alg_y != nullptr)
delete p_alg_y;
}
@@ -423,24 +423,24 @@ public:
if (this == &pt)
return (*this);
- if (p_rat_x != NULL)
+ if (p_rat_x != nullptr)
delete p_rat_x;
- if (p_alg_x != NULL)
+ if (p_alg_x != nullptr)
delete p_alg_x;
- if (p_rat_y != NULL)
+ if (p_rat_y != nullptr)
delete p_rat_y;
- if (p_alg_y != NULL)
+ if (p_alg_y != nullptr)
delete p_alg_y;
- p_alg_x = p_rat_x = p_alg_y = p_rat_y = NULL;
+ p_alg_x = p_rat_x = p_alg_y = p_rat_y = nullptr;
- if (pt.p_alg_x != NULL)
+ if (pt.p_alg_x != nullptr)
p_alg_x = new Algebraic (*(pt.p_alg_x));
- if (pt.p_rat_x != NULL)
+ if (pt.p_rat_x != nullptr)
p_rat_x = new Rational (*(pt.p_rat_x));
- if (pt.p_alg_y != NULL)
+ if (pt.p_alg_y != nullptr)
p_alg_y = new Algebraic (*(pt.p_alg_y));
- if (pt.p_rat_y != NULL)
+ if (pt.p_rat_y != nullptr)
p_rat_y = new Rational (*(pt.p_rat_y));
_origs = pt._origs;
@@ -452,13 +452,13 @@ public:
/*! Check if the point is exactly computed. */
inline bool is_exact () const
{
- return (p_alg_x != NULL && p_alg_y != NULL);
+ return (p_alg_x != nullptr && p_alg_y != nullptr);
}
/*! Check if the point has rational coordinates. */
inline bool is_rational () const
{
- return (p_rat_x != NULL && p_rat_y != NULL);
+ return (p_rat_x != nullptr && p_rat_y != nullptr);
}
/*!
@@ -1060,8 +1060,8 @@ _Bezier_point_2_rep::_Bezier_point_2_rep
template
_Bezier_point_2_rep::_Bezier_point_2_rep
(const Curve_2& B, const Algebraic& t0) :
- p_rat_x (NULL),
- p_rat_y (NULL)
+ p_rat_x (nullptr),
+ p_rat_y (nullptr)
{
// Create the originator pair .
// Note that this constructor also takes care of the Bez_bound
@@ -1095,8 +1095,8 @@ template
_Bezier_point_2_rep::_Bezier_point_2_rep
(const Curve_2& B, unsigned int xid,
const Algebraic& t0) :
- p_rat_x (NULL),
- p_rat_y (NULL)
+ p_rat_x (nullptr),
+ p_rat_y (nullptr)
{
// Create the originator pair .
// Note that this constructor also takes care of the Bez_bound
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h
index 8b4d0602224..a2b6d69e40d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h
@@ -1187,7 +1187,7 @@ public:
*/
template
OutputIterator intersect (const Self& cv, OutputIterator oi,
- Intersection_map *inter_map = NULL) const
+ Intersection_map *inter_map = nullptr) const
{
// First check whether the two arcs have the same supporting curve.
if (has_same_supporting_curve (cv))
@@ -1232,7 +1232,7 @@ public:
Intersection_list inter_list;
bool invalid_ids = false;
- if (inter_map != NULL && _index() != 0 && cv._index() != 0)
+ if (inter_map != nullptr && _index() != 0 && cv._index() != 0)
{
if (_index() < cv._index())
id_pair = Curve_id_pair (_index(), cv._index());
@@ -1245,12 +1245,12 @@ public:
{
// In case one of the IDs is invalid, we do not look in the map neither
// we cache the results.
- if (inter_map != NULL)
+ if (inter_map != nullptr)
map_iter = inter_map->end();
invalid_ids = true;
}
- if (inter_map == NULL || map_iter == inter_map->end())
+ if (inter_map == nullptr || map_iter == inter_map->end())
{
// Compute the intersections points between the two supporting curves.
if (is_linear())
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h
index 87b6e5c17b6..baf1919e254 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h
@@ -114,7 +114,7 @@ protected:
};
Extra_data *_extra_data_P; // The extra data stored with the arc
- // (may be NULL).
+ // (may be nullptr).
public:
@@ -128,7 +128,7 @@ public:
_r(0), _s(0), _t(0), _u(0), _v(0), _w(0),
_orient (COLLINEAR),
_info (0),
- _extra_data_P (NULL)
+ _extra_data_P (nullptr)
{}
/*!
@@ -142,10 +142,10 @@ public:
_source(arc._source),
_target(arc._target)
{
- if (arc._extra_data_P != NULL)
+ if (arc._extra_data_P != nullptr)
_extra_data_P = new Extra_data (*(arc._extra_data_P));
else
- _extra_data_P = NULL;
+ _extra_data_P = nullptr;
}
/*!
@@ -155,7 +155,7 @@ public:
*/
_Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
const Rational& u, const Rational& v, const Rational& w) :
- _extra_data_P (NULL)
+ _extra_data_P (nullptr)
{
// Make sure the given curve is an ellipse (4rs - t^2 should be positive).
CGAL_precondition (CGAL::sign (4*r*s - t*t) == POSITIVE);
@@ -189,7 +189,7 @@ public:
_orient (orient),
_source (source),
_target (target),
- _extra_data_P (NULL)
+ _extra_data_P (nullptr)
{
// Make sure that the source and the taget are not the same.
CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
@@ -214,7 +214,7 @@ public:
*/
_Conic_arc_2 (const Rat_segment_2& seg) :
_orient (COLLINEAR),
- _extra_data_P (NULL)
+ _extra_data_P (nullptr)
{
// Set the source and target.
Rat_kernel ker;
@@ -271,7 +271,7 @@ public:
*/
_Conic_arc_2 (const Rat_circle_2& circ) :
_orient (CLOCKWISE),
- _extra_data_P (NULL)
+ _extra_data_P (nullptr)
{
// Get the circle properties.
Rat_kernel ker;
@@ -316,7 +316,7 @@ public:
_orient(orient),
_source(source),
_target(target),
- _extra_data_P (NULL)
+ _extra_data_P (nullptr)
{
// Make sure that the source and the taget are not the same.
CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
@@ -378,7 +378,7 @@ public:
_Conic_arc_2 (const Rat_point_2& p1,
const Rat_point_2& p2,
const Rat_point_2& p3):
- _extra_data_P (NULL)
+ _extra_data_P (nullptr)
{
// Set the source and target.
Rational x1 = p1.x();
@@ -467,7 +467,7 @@ public:
const Rat_point_2& p3,
const Rat_point_2& p4,
const Rat_point_2& p5) :
- _extra_data_P(NULL)
+ _extra_data_P(nullptr)
{
// Make sure that no three points are collinear.
Rat_kernel ker;
@@ -574,7 +574,7 @@ public:
const Rational& r_2, const Rational& s_2, const Rational& t_2,
const Rational& u_2, const Rational& v_2, const Rational& w_2):
_orient(orient),
- _extra_data_P(NULL)
+ _extra_data_P(nullptr)
{
// Create the integer coefficients of the base conic.
Rational rat_coeffs [6];
@@ -753,7 +753,7 @@ public:
*/
virtual ~_Conic_arc_2 ()
{
- if (_extra_data_P != NULL)
+ if (_extra_data_P != nullptr)
delete _extra_data_P;
}
@@ -767,7 +767,7 @@ public:
return (*this);
// Free any existing data.
- if (_extra_data_P != NULL)
+ if (_extra_data_P != nullptr)
delete _extra_data_P;
// Copy the arc's attributes.
@@ -784,10 +784,10 @@ public:
_target = arc._target;
// Duplicate the extra data, if necessary.
- if (arc._extra_data_P != NULL)
+ if (arc._extra_data_P != nullptr)
_extra_data_P = new Extra_data (*(arc._extra_data_P));
else
- _extra_data_P = NULL;
+ _extra_data_P = nullptr;
return (*this);
}
@@ -1204,7 +1204,7 @@ private:
return;
}
- _extra_data_P = NULL;
+ _extra_data_P = nullptr;
// Check whether we have a degree 2 curve.
if ((CGAL::sign (_r) != ZERO ||
@@ -1339,7 +1339,7 @@ private:
CGAL_assertion (is_ellipse);
// We do not have to store any extra data with the arc.
- _extra_data_P = NULL;
+ _extra_data_P = nullptr;
// Mark that this arc is a full conic curve.
if (is_ellipse)
@@ -1470,9 +1470,9 @@ protected:
Sign _sign_of_extra_data (const Algebraic& px,
const Algebraic& py) const
{
- CGAL_assertion (_extra_data_P != NULL);
+ CGAL_assertion (_extra_data_P != nullptr);
- if (_extra_data_P == NULL)
+ if (_extra_data_P == nullptr)
return (ZERO);
Algebraic val = (_extra_data_P->a*px + _extra_data_P->b*py +
@@ -1542,7 +1542,7 @@ protected:
return (true);
// Check if we have extra data available.
- if (_extra_data_P != NULL)
+ if (_extra_data_P != nullptr)
{
if (_extra_data_P->side != ZERO)
{
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h
index a3a2826f01a..167acd65096 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h
@@ -522,7 +522,7 @@ public:
}
else if (this->_orient == COLLINEAR)
{
- CGAL_assertion (this->_extra_data_P != NULL);
+ CGAL_assertion (this->_extra_data_P != nullptr);
// In this case the equation of the supporting line is given by the
// extra data structure.
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h
index 7d27f2d260f..d4dbd24e525 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h
@@ -235,7 +235,7 @@ public:
m_cvP(cvP),
m_index(index)
{
- m_num_pts = (m_cvP == NULL) ? 0 :
+ m_num_pts = (m_cvP == nullptr) ? 0 :
((m_cvP->number_of_subcurves() == 0) ?
0 : (m_cvP->number_of_subcurves() + 1));
}
@@ -246,7 +246,7 @@ public:
public:
/*! Default constructor. */
Point_const_iterator() :
- m_cvP(NULL),
+ m_cvP(nullptr),
m_num_pts(0),
m_index(std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
{}
@@ -256,7 +256,7 @@ public:
*/
const Point_type_2& operator*() const
{
- CGAL_assertion(m_cvP != NULL);
+ CGAL_assertion(m_cvP != nullptr);
CGAL_assertion((is_index_valid()) && (m_index < m_num_pts));
// First point is the source of the first subcurve.
@@ -273,28 +273,28 @@ public:
/*! Increment operators. */
Point_const_iterator& operator++()
{
- if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index;
+ if ((m_cvP != nullptr) && (m_index < m_num_pts)) ++m_index;
return (*this);
}
Point_const_iterator operator++(int)
{
Point_const_iterator temp = *this;
- if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index;
+ if ((m_cvP != nullptr) && (m_index < m_num_pts)) ++m_index;
return temp;
}
/*! Decrement operators. */
Point_const_iterator& operator--()
{
- if ((m_cvP != NULL) && (is_index_valid())) --m_index;
+ if ((m_cvP != nullptr) && (is_index_valid())) --m_index;
return (*this);
}
Point_const_iterator operator--(int)
{
Point_const_iterator temp = *this;
- if ((m_cvP != NULL) && (is_index_valid())) --m_index;
+ if ((m_cvP != nullptr) && (is_index_valid())) --m_index;
return temp;
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h
index 6a38a2474b2..153c968e9d2 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h
@@ -114,9 +114,9 @@ protected:
public:
/*! Default constructor. */
Arr_landmarks_point_location() :
- p_arr(NULL),
- m_traits(NULL),
- lm_gen(NULL),
+ p_arr(nullptr),
+ m_traits(nullptr),
+ lm_gen(nullptr),
own_gen(false)
{}
@@ -141,25 +141,25 @@ public:
{
if (own_gen) {
delete lm_gen;
- lm_gen = NULL;
+ lm_gen = nullptr;
}
}
/*! Attach an arrangement object (and a generator, if supplied). */
- void attach(const Arrangement_2& arr, Generator* gen = NULL)
+ void attach(const Arrangement_2& arr, Generator* gen = nullptr)
{
// Keep a pointer to the associated arrangement.
p_arr = &arr;
m_traits = static_cast(p_arr->geometry_traits());
// Update the landmarks generator.
- if (gen != NULL) {
+ if (gen != nullptr) {
// In case a generator is given, keep a pointer to it.
- CGAL_assertion(lm_gen == NULL);
+ CGAL_assertion(lm_gen == nullptr);
lm_gen = gen;
own_gen = false;
}
- else if (lm_gen != NULL) {
+ else if (lm_gen != nullptr) {
// In case a generator exists internally, make sure it is attached to
// the given arrangement.
Arrangement_2& non_const_arr = const_cast(*p_arr);
@@ -175,10 +175,10 @@ public:
/*! Detach the instance from the arrangement object. */
void detach()
{
- p_arr = NULL;
- m_traits = NULL;
+ p_arr = nullptr;
+ m_traits = nullptr;
- CGAL_assertion(lm_gen != NULL);
+ CGAL_assertion(lm_gen != nullptr);
if (lm_gen)
lm_gen->detach();
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h
index ecb5c98a70b..47f3f59bb65 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h
@@ -1519,7 +1519,7 @@ public:
// Check whether we have a single intersection point.
const Point_2 *ip = object_cast (&obj);
- if (ip != NULL)
+ if (ip != nullptr)
{
// Check whether the intersection point ip lies on both segments.
const bool ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h
index f7b4b665bb3..3abb2ed91b1 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h
@@ -78,9 +78,9 @@ protected:
public:
/*! Default constructor. */
Arr_naive_point_location() :
- p_arr(NULL),
- geom_traits(NULL),
- top_traits(NULL)
+ p_arr(nullptr),
+ geom_traits(nullptr),
+ top_traits(nullptr)
{}
/*! Constructor given an arrangement. */
@@ -101,9 +101,9 @@ public:
/*! Detach from the current arrangement object. */
void detach()
{
- p_arr = NULL;
- geom_traits = NULL;
- top_traits = NULL;
+ p_arr = nullptr;
+ geom_traits = nullptr;
+ top_traits = nullptr;
}
/*!
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h
index 8c0d0475475..0863bc5c7eb 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h
@@ -241,7 +241,7 @@ public:
// Chack if the intersection is a point:
const Point_2 *ip;
- if ((ip = object_cast (&res)) != NULL)
+ if ((ip = object_cast (&res)) != nullptr)
{
// Create a pair representing the point with its multiplicity,
// which is always 1 for line segments for all practical purposes.
@@ -257,7 +257,7 @@ public:
// The intersection is a segment.
const X_monotone_curve_2 *ov = object_cast(&res);
- CGAL_assertion (ov != NULL);
+ CGAL_assertion (ov != nullptr);
Self self;
Comparison_result cmp1 = self.compare_endpoints_xy_2_object()(cv1);
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h
index 1f2492da4f0..f17b7691d41 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h
@@ -72,7 +72,7 @@ public:
/*! Default constructor. */
Arr_observer () :
- p_arr (NULL)
+ p_arr (nullptr)
{}
/*! Constructor with an associated arrangement. */
@@ -87,7 +87,7 @@ public:
virtual ~Arr_observer ()
{
// Unregister the observer object from the arrangement.
- if (p_arr != NULL)
+ if (p_arr != nullptr)
p_arr->_unregister_observer (this);
}
//@}
@@ -118,9 +118,9 @@ public:
return;
// The observer is not already attached to an arrangement.
- CGAL_precondition (p_arr == NULL);
+ CGAL_precondition (p_arr == nullptr);
- if (p_arr != NULL)
+ if (p_arr != nullptr)
return;
// Notify the concrete oberver (the sub-class) about the attachment.
@@ -139,7 +139,7 @@ public:
/*! Detach the observer from the arrangement. */
void detach ()
{
- if (p_arr == NULL)
+ if (p_arr == nullptr)
return;
// Notify the concrete oberver (the sub-class) about the detachment.
@@ -148,7 +148,7 @@ public:
// Unregister the observer object from the current arrangement, and mark
// that the oberver is not attached to an arrangement.
p_arr->_unregister_observer (this);
- p_arr = NULL;
+ p_arr = nullptr;
// Notify the concrete oberver that the detachment took place.
after_detach();
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h
index cffef3904fa..54fec0daef3 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h
@@ -169,7 +169,7 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex,
// We found a vertex closer to p; Continue using this vertex.
const Vertex_const_handle* p_vh =
Result().template assign(obj);
- CGAL_assertion(p_vh != NULL);
+ CGAL_assertion(p_vh != nullptr);
vh = *p_vh;
continue;
}
@@ -504,7 +504,7 @@ _walk_from_face(Face_const_handle face,
do {
// Check whether p lies inside the current face (including its holes):
- if (p_arr->topology_traits()->is_in_face(&(*face), p, NULL))
+ if (p_arr->topology_traits()->is_in_face(&(*face), p, nullptr))
{
// We know that p is located inside the current face, and we check
// whether it lies inside one of its holes (or on the boundary of
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h
index 5c97ae275dd..bd4128490a4 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h
@@ -161,7 +161,7 @@ private:
public:
/*! Default constructor. */
Arr_landmarks_nearest_neighbor () :
- m_tree(NULL),
+ m_tree(nullptr),
m_is_empty(true)
{}
@@ -177,7 +177,7 @@ public:
template
void init(InputIterator begin, InputIterator end)
{
- CGAL_precondition_msg(m_tree == NULL,
+ CGAL_precondition_msg(m_tree == nullptr,
"The search tree is already initialized.");
if (begin != end) {
@@ -193,9 +193,9 @@ public:
/*! Clear the search tree. */
void clear()
{
- if (m_tree != NULL)
+ if (m_tree != nullptr)
delete m_tree;
- m_tree = NULL;
+ m_tree = nullptr;
m_is_empty = true;
}
@@ -209,7 +209,7 @@ public:
*/
Point_2 find_nearest_neighbor(const Point_2& q, PL_result_type &obj) const
{
- CGAL_precondition_msg(m_tree != NULL && ! m_is_empty,
+ CGAL_precondition_msg(m_tree != nullptr && ! m_is_empty,
"The search tree is not initialized.");
// Create an NN_Point_2 object from the query point and use it to
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h
index fb12b853287..ab194ac8361 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h
@@ -79,7 +79,7 @@ Arr_naive_point_location::locate(const Point_2& p) const
for (fit = p_arr->faces_begin(); fit != p_arr->faces_end(); ++fit) {
fh = fit;
- if (top_traits->is_in_face(&(*fh), p, NULL)) {
+ if (top_traits->is_in_face(&(*fh), p, nullptr)) {
// The current face contains p in its interior.
if (f_inner == invalid_f ||
f_inner->is_unbounded() ||
@@ -102,7 +102,7 @@ Arr_naive_point_location::locate(const Point_2& p) const
fh->outer_ccbs_begin();
Vertex_const_handle v = (*it)->source();
- if (top_traits->is_in_face(&(*f_inner), v->point(), NULL))
+ if (top_traits->is_in_face(&(*f_inner), v->point(), nullptr))
f_inner = fh;
}
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h
index ef1fa8cdfbb..675d90cd7c5 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h
@@ -135,9 +135,9 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
Comparison_result res = EQUAL;
Comparison_result y_res;
bool in_x_range;
- const typename Dcel::Halfedge* closest_he = NULL; // The closest so far.
- const typename Dcel::Vertex* cl_vs = NULL; // Its source.
- const typename Dcel::Vertex* cl_vt = NULL; // Its target.
+ const typename Dcel::Halfedge* closest_he = nullptr; // The closest so far.
+ const typename Dcel::Vertex* cl_vs = nullptr; // Its source.
+ const typename Dcel::Vertex* cl_vt = nullptr; // Its target.
while (eit != e_end) {
// Get the current edge and its source and target vertices.
@@ -158,7 +158,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
res = m_topol_traits->compare_y_at_x(p, he);
if (in_x_range && (res == point_above_under)) {
- if (closest_he == NULL) {
+ if (closest_he == nullptr) {
// If no other x-monotone curve containing p in its x-range has been
// found yet, take the current one as the vertically closest to p.
closest_he = he;
@@ -242,7 +242,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
}
// If we did not locate a closest halfedge, return an empty object.
- if (closest_he == NULL)
+ if (closest_he == nullptr)
return make_optional_result();
// If we found a fictitious edge, return it now.
@@ -305,7 +305,7 @@ Arr_simple_point_location::_vertical_ray_shoot(const Point_2& p,
else {
const Halfedge_const_handle* p_hh =
Result().template assign(obj);
- CGAL_assertion(p_hh != NULL);
+ CGAL_assertion(p_hh != nullptr);
found_halfedge = true;
closest_he = *p_hh;
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
index cd5506271fb..14833c9ba15 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
@@ -193,7 +193,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p,
Td_map_item& left_v_item = td.locate(tr.left(),td_lt);
CGAL_assertion(td_lt == TD::POINT);
Halfedge_const_handle he;
- if (boost::get(&left_v_item) != NULL) {
+ if (boost::get(&left_v_item) != nullptr) {
Td_active_vertex v(boost::get(left_v_item));
he = v.cw_he();
}
@@ -225,7 +225,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p,
Td_map_item& right_v_item = td.locate(tr.right(),td_lt);
CGAL_assertion(td_lt == TD::POINT);
Halfedge_const_handle he;
- if (boost::get(&right_v_item)!= NULL) {
+ if (boost::get(&right_v_item)!= nullptr) {
Td_active_vertex v(boost::get(right_v_item));
he = v.cw_he();
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h
index 39a2d5d3cb9..1fc1332a99b 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h
@@ -248,7 +248,7 @@ public:
Curve_end v_ce(left()->curve_end());
ptr()->e2 = (boost::shared_ptr)(new X_monotone_curve_2(v_ce.cv()));
- //CGAL_assertion(boost::get>( &(ptr()->e2)) != NULL);
+ //CGAL_assertion(boost::get>( &(ptr()->e2)) != nullptr);
ptr()->e1 = (v_ce.ce() == ARR_MIN_END ) ? CGAL_TD_CV_MIN_END : CGAL_TD_CV_MAX_END;
@@ -452,7 +452,7 @@ public:
CGAL_TD_INLINE Vertex_const_handle left_unsafe() const
{
CGAL_precondition(is_active());
- CGAL_assertion(boost::get(&(ptr()->e0)) != NULL);
+ CGAL_assertion(boost::get(&(ptr()->e0)) != nullptr);
return boost::get(ptr()->e0);
}
@@ -475,7 +475,7 @@ public:
CGAL_TD_INLINE Vertex_const_handle right_unsafe() const
{
CGAL_precondition(is_active());
- CGAL_assertion(boost::get(&(ptr()->e1)) != NULL);
+ CGAL_assertion(boost::get(&(ptr()->e1)) != nullptr);
return boost::get(ptr()->e1);
}
@@ -498,7 +498,7 @@ public:
CGAL_TD_INLINE Halfedge_const_handle bottom_unsafe () const
{
CGAL_precondition(is_active());
- CGAL_assertion(boost::get(&(ptr()->e2)) != NULL);
+ CGAL_assertion(boost::get(&(ptr()->e2)) != nullptr);
return boost::get(ptr()->e2);
}
@@ -535,7 +535,7 @@ public:
CGAL_precondition(type() == TD_VERTEX);
CGAL_precondition(!is_on_boundaries());
- CGAL_assertion(boost::get( &(ptr()->e0)) != NULL);
+ CGAL_assertion(boost::get( &(ptr()->e0)) != nullptr);
return boost::get( ptr()->e0 );
}
@@ -545,10 +545,10 @@ public:
CGAL_precondition(type() == TD_VERTEX);
CGAL_precondition(is_on_boundaries());
- CGAL_assertion(boost::get( &(ptr()->e1)) != NULL);
- CGAL_assertion(boost::get >(&(ptr()->e2)) != NULL);
+ CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr);
+ CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get();
- CGAL_assertion(cv_ptr != NULL);
+ CGAL_assertion(cv_ptr != nullptr);
Arr_curve_end ce =
(boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
@@ -563,10 +563,10 @@ public:
CGAL_precondition(type() == TD_VERTEX);
CGAL_precondition(is_on_boundaries());
- CGAL_assertion(boost::get( &(ptr()->e1)) != NULL);
- CGAL_assertion(boost::get >(&(ptr()->e2)) != NULL);
+ CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr);
+ CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get();
- CGAL_assertion(cv_ptr != NULL);
+ CGAL_assertion(cv_ptr != nullptr);
Arr_curve_end ce =
(boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
@@ -580,10 +580,10 @@ public:
CGAL_precondition(!is_active());
CGAL_precondition(type() == TD_VERTEX);
- CGAL_assertion(boost::get( &(ptr()->e1)) != NULL);
- CGAL_assertion(boost::get >(&(ptr()->e2)) != NULL);
+ CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr);
+ CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get();
- CGAL_assertion(cv_ptr != NULL);
+ CGAL_assertion(cv_ptr != nullptr);
Arr_curve_end ce =
(boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
@@ -596,9 +596,9 @@ public:
{
CGAL_precondition(!is_active() && type() == TD_EDGE);
- CGAL_assertion(boost::get >(&(ptr()->e2)) != NULL);
+ CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get();
- CGAL_assertion(cv_ptr != NULL);
+ CGAL_assertion(cv_ptr != nullptr);
return *cv_ptr;
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h
index 2a62c0b8635..abb8fbb0942 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h
@@ -200,8 +200,8 @@ public:
{
PTR = new Data
- (Traits::empty_he_handle(), Td_map_item(0), NULL);
- //m_dag_node = NULL;
+ (Traits::empty_he_handle(), Td_map_item(0), nullptr);
+ //m_dag_node = nullptr;
}
/*! Constructor given Vertex & Halfedge handles. */
Td_active_edge (Halfedge_const_handle he ,
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h
index 457d955a7d8..e8c7d64fc9d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h
@@ -189,7 +189,7 @@ public:
Td_active_fictitious_vertex()
{
- PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), NULL);
+ PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
}
/*! Constructor given Vertex & Halfedge handles. */
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h
index 1468e0b61aa..4ef7826fc53 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h
@@ -261,7 +261,7 @@ public:
Traits::empty_vtx_handle(),
Traits::empty_he_handle(),
Traits::empty_he_handle(),
- Td_map_item(0), Td_map_item(0) , Td_map_item(0) , Td_map_item(0), NULL);
+ Td_map_item(0), Td_map_item(0) , Td_map_item(0) , Td_map_item(0), nullptr);
//m_dag_node = 0;
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h
index d912cf09daa..47d4f78c5b0 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h
@@ -191,7 +191,7 @@ public:
Td_active_vertex()
{
- PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), NULL);
+ PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
}
/*! Constructor given Vertex & Halfedge handles. */
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h
index 72ecbde372d..96b5afde8e9 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h
@@ -168,7 +168,7 @@ public:
//@{
/*! Constructor given Vertex & Halfedge handles. */
- Td_inactive_edge (boost::shared_ptr& cv, Dag_node* node = NULL)
+ Td_inactive_edge (boost::shared_ptr& cv, Dag_node* node = nullptr)
{
PTR = new Data(cv,node);
}
@@ -230,7 +230,7 @@ public:
inline X_monotone_curve_2& curve() const
{
X_monotone_curve_2* cv_ptr = (ptr()->cv).get();
- CGAL_assertion(cv_ptr != NULL);
+ CGAL_assertion(cv_ptr != nullptr);
return *cv_ptr;
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h
index 60fee1f9668..0208d5915ad 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h
@@ -190,7 +190,7 @@ public:
//@{
/*! Constructor given Vertex & Halfedge handles. */
- Td_inactive_fictitious_vertex (Vertex_const_handle v_before_rem, Dag_node* node = NULL)
+ Td_inactive_fictitious_vertex (Vertex_const_handle v_before_rem, Dag_node* node = nullptr)
{
Curve_end v_ce(vtx_to_ce(v_before_rem));
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h
index 83188f90631..ae92b825c0e 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h
@@ -169,7 +169,7 @@ public:
//@{
/*! Constructor given Vertex & Halfedge handles. */
- Td_inactive_vertex (Vertex_const_handle v_before_rem, Dag_node* node = NULL)
+ Td_inactive_vertex (Vertex_const_handle v_before_rem, Dag_node* node = nullptr)
{
PTR = new Data(v_before_rem->point(), node);
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h
index 02f099b8b54..3dc5e4c26d5 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h
@@ -266,7 +266,7 @@ public:
m_sep doesn't intersect any existing edges except possibly on common end
points.
postconditions:
- if the rightmost trapezoid was traversed m_cur_item is set to NULL.
+ if the rightmost trapezoid was traversed m_cur_item is set to nullptr.
remark:
if the seperator is vertical, using the precondition assumptions it
follows that there is exactly one trapezoid to travel.
@@ -277,9 +277,9 @@ public:
return *this;// end reached, do nothing!
#ifndef CGAL_TD_DEBUG
- CGAL_warning(traits != NULL);
+ CGAL_warning(traits != nullptr);
#else
- CGAL_assertion(traits != NULL);
+ CGAL_assertion(traits != nullptr);
CGAL_assertion(traits->is_active(m_cur_item));
//m_cur_item should be a trapezoid or an edge
CGAL_assertion(!traits->is_td_vertex(m_cur_item));
@@ -342,7 +342,7 @@ public:
Td_active_edge e (boost::get(m_cur_item));
CGAL_assertion_code(Dag_node* tt = e.dag_node();)
- CGAL_assertion(tt != NULL);
+ CGAL_assertion(tt != nullptr);
CGAL_assertion(tt->is_inner_node());
//go to next() of the current edge.
@@ -654,12 +654,12 @@ public:
Dag_node* operator()(Td_nothing& /* t */) const
{
CGAL_assertion(false);
- return NULL;
+ return nullptr;
}
Dag_node* operator()(Td_inactive_trapezoid& /* t */) const
{
CGAL_assertion(false);
- return NULL;
+ return nullptr;
}
template < typename T >
@@ -985,7 +985,7 @@ protected:
const X_monotone_curve_2& cv,
Comparison_result cres) const
{
- CGAL_assertion(traits != NULL);
+ CGAL_assertion(traits != nullptr);
Td_map_item& item = left_cv_end_node.get_data();
CGAL_precondition(traits->is_td_vertex(item));
CGAL_precondition (are_equal_end_points(Curve_end(cv,ARR_MIN_END),
@@ -1359,13 +1359,13 @@ public:
// const Dag_node* child;
// CGAL_assertion(tr_copy);
// tr_copy->set_rt(cur->rt() ?
- // htr.find(cur->rt())->second : NULL);
+ // htr.find(cur->rt())->second : nullptr);
// tr_copy->set_rb(cur->rb() ?
- // htr.find(cur->rb())->second : NULL);
+ // htr.find(cur->rb())->second : nullptr);
// tr_copy->set_lt(cur->lt() ?
- // htr.find(cur->lt())->second : NULL);
+ // htr.find(cur->lt())->second : nullptr);
// tr_copy->set_lb(cur->lb() ?
- // htr.find(cur->lb())->second : NULL);
+ // htr.find(cur->lb())->second : nullptr);
// if (cur->dag_node()->is_inner_node())
// {
@@ -1391,7 +1391,7 @@ public:
*/
virtual ~Trapezoidal_decomposition_2()
{
- CGAL_warning(m_dag_root != NULL);
+ CGAL_warning(m_dag_root != nullptr);
if (!m_dag_root) return;
delete m_dag_root;
@@ -1616,7 +1616,7 @@ public:
//the actual locate. curr is the DAG root, the traits,
//the end point to locate,
- //and NULL as cv ptr - indicates point location
+ //and nullptr as cv ptr - indicates point location
lt = search_using_dag (curr, traits, ce, Halfedge_const_handle());
#ifdef CGAL_TD_DEBUG
@@ -1646,7 +1646,7 @@ public:
// locate call may change the class
Td_map_item& locate( Vertex_const_handle v, Locate_type& lt) const
{
- CGAL_precondition(traits != NULL);
+ CGAL_precondition(traits != nullptr);
return locate(traits->vtx_to_ce(v), lt);
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h
index b85c6fa5dc5..715a9e74d7e 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h
@@ -278,7 +278,7 @@ split_trapezoid_by_halfedge(Dag_node& split_node,
Td_map_item& prev_top_tr,
Halfedge_const_handle he)
{
- CGAL_warning(traits != NULL);
+ CGAL_warning(traits != nullptr);
CGAL_precondition(traits->is_active(split_node.get_data()));
CGAL_precondition(traits->is_td_trapezoid(split_node.get_data()));
@@ -397,7 +397,7 @@ update_vtx_with_new_edge(Halfedge_const_handle he,
const Locate_type&
CGAL_precondition_code(lt))
{
- CGAL_assertion(traits != NULL);
+ CGAL_assertion(traits != nullptr);
CGAL_precondition(lt == POINT);
CGAL_precondition(traits->is_active(vtx_item));
@@ -441,7 +441,7 @@ insert_curve_at_vtx_using_dag(Halfedge_const_handle he,
Dag_node* node = boost::apply_visitor(dag_node_visitor(), item);
- CGAL_assertion(node != NULL);
+ CGAL_assertion(node != nullptr);
CGAL_assertion(he != m_empty_he_handle);
@@ -998,7 +998,7 @@ search_using_dag(Dag_node& curr_node,
Comparison_result up /*=EQUAL*/) const
{
if (he == m_empty_he_handle)
- return search_using_dag_with_cv(curr_node,traits,ce,NULL, up);
+ return search_using_dag_with_cv(curr_node,traits,ce,nullptr, up);
else
return search_using_dag_with_cv(curr_node,traits,ce,&he->curve(), up);
}
@@ -1377,7 +1377,7 @@ typename Trapezoidal_decomposition_2::Dag_node
Trapezoidal_decomposition_2::
container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const
{
- CGAL_warning(traits != NULL);
+ CGAL_warning(traits != nullptr);
if (right > left) {
int d = (int)std::floor((double(right+left))/2);
@@ -1414,7 +1414,7 @@ container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const
//curr_node.right_child()->set_dag_node(&curr_node.right_child());
//curr_node->set_dag_node(&curr_node);// fake temporary node
deactivate_vertex(curr_node); //curr_node->remove(); // mark as deleted
- boost::apply_visitor(set_dag_node_visitor((Dag_node*)NULL),
+ boost::apply_visitor(set_dag_node_visitor((Dag_node*)nullptr),
curr_node.get_data());//curr_node->set_dag_node(0);
return curr_node;
@@ -1462,7 +1462,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he)
// locate the input Halfedge end points in the Td_map_item Dag
- CGAL_assertion(traits != NULL);
+ CGAL_assertion(traits != nullptr);
//get the two vertices of the halfedge
Vertex_const_handle v1 =
@@ -1565,7 +1565,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he)
}
first_time = false;
- CGAL_assertion(node != NULL);
+ CGAL_assertion(node != nullptr);
split_trapezoid_by_halfedge(*node, old_e, old_bottom_tr, old_top_tr, he);
if (node->is_inner_node()) {
@@ -1644,7 +1644,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he)
locate_opt_empty();
#endif
- CGAL_warning(traits != NULL);
+ CGAL_warning(traits != nullptr);
//calculating leftmost and rightmost curve ends of he
const Curve_end leftmost(he, ARR_MIN_END);
@@ -1663,8 +1663,8 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he)
if (lt1 != POINT || lt2 != POINT) return;
- CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != NULL);
- CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != NULL);
+ CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != nullptr);
+ CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != nullptr);
//retrieve the Dag_nodes of the two point-degenerate trapezoid
Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item));
@@ -1883,7 +1883,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he)
removed_cv_ptr(new X_monotone_curve_2(he->curve()));
Base_map_item_iterator last_edge_fragment_it = mid_it;
//Base_trapezoid_iterator last_mid = mid_it;
- Dag_node* e_node = NULL;
+ Dag_node* e_node = nullptr;
while (!!++mid_it) {
e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it);
deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove();
@@ -2023,7 +2023,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
//
// if (!traits)
// {
-// CGAL_warning(traits != NULL);
+// CGAL_warning(traits != nullptr);
// return;
// }
// if (!traits->are_mergeable_2_object()(cv1,cv2))
@@ -2040,7 +2040,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
// std::cerr << "\ncv1 " << cv1;
// std::cerr << "\ncv1 " << cv2 << std::endl;
// }
-// CGAL_precondition(traits != NULL);
+// CGAL_precondition(traits != nullptr);
// CGAL_precondition(traits->are_mergeable_2_object()(cv1,cv2));
//
//#endif
@@ -2101,8 +2101,8 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
//
// CGAL_precondition(lt1==POINT && lt2==POINT);
// CGAL_precondition(t1.is_active() && t2.is_active());
-// CGAL_warning(t1.dag_node() != NULL);
-// CGAL_warning(t2.dag_node() != NULL);
+// CGAL_warning(t1.dag_node() != nullptr);
+// CGAL_warning(t2.dag_node() != nullptr);
//
//#endif
// m_before_split.m_cv_before_split = cv;
@@ -2221,8 +2221,8 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
//
// //define the left halfedge and the right halfedge, according
// // to the splitting point
-// //Halfedge_const_handle* p_left_he = NULL;
-// //Halfedge_const_handle* p_right_he = NULL;
+// //Halfedge_const_handle* p_left_he = nullptr;
+// //Halfedge_const_handle* p_right_he = nullptr;
// Halfedge_const_handle left_he = he2;
// Halfedge_const_handle right_he = he1;
//
@@ -2592,7 +2592,7 @@ merge_edge(Halfedge_const_handle he1,
const X_monotone_curve_2& cv2 = he2->curve();
if (!traits) {
- CGAL_warning(traits != NULL);
+ CGAL_warning(traits != nullptr);
return;
}
if (!traits->are_mergeable_2_object() (cv1, cv2)) {
@@ -2645,10 +2645,10 @@ merge_edge(Halfedge_const_handle he1,
Td_map_item rightp_item = locate(rightmost, lt2);
Td_map_item mrgp_item = locate(ce, lt);
- //varifying that all trapezoids are not NULL and are of type POINT
- CGAL_warning(boost::apply_visitor(dag_node_visitor(), leftp_item) != NULL);
- CGAL_warning(boost::apply_visitor(dag_node_visitor(), rightp_item)!= NULL);
- CGAL_warning(boost::apply_visitor(dag_node_visitor(), mrgp_item) != NULL);
+ //varifying that all trapezoids are not nullptr and are of type POINT
+ CGAL_warning(boost::apply_visitor(dag_node_visitor(), leftp_item) != nullptr);
+ CGAL_warning(boost::apply_visitor(dag_node_visitor(), rightp_item)!= nullptr);
+ CGAL_warning(boost::apply_visitor(dag_node_visitor(), mrgp_item) != nullptr);
//define the left curve and the right curve, according
// to the common point (that is merged)
@@ -2832,7 +2832,7 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node,
bool plus_inf, Dag_node& max_node,
Dag_node& node)
{
- //if NULL
+ //if nullptr
if (node.is_null()) return 0;
//if not valid range or empty return 0
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h
index ba5c3a9b30b..21601f4605a 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h
@@ -849,7 +849,7 @@ public:
for (size_t i = 0; i < int_seg.size(); ++i) {
const X_monotone_subcurve_2* x_seg =
CGAL::object_cast (&(int_seg[i]));
- if (x_seg != NULL) {
+ if (x_seg != nullptr) {
X_monotone_subcurve_2 seg = *x_seg;
// If for some reason the subcurve intersection
@@ -861,7 +861,7 @@ public:
const Point_2_pair* p_ptr =
CGAL::object_cast(&(int_seg[i]));
- if (p_ptr != NULL) {
+ if (p_ptr != nullptr) {
// Any point that is not equal to the max_vertex of the
// subcurve should be inserted into oi.
// The max_vertex of the current subcurve (if intersecting)
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h
index aec75ad25f8..ab22374915e 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h
@@ -108,7 +108,7 @@ public:
public:
Cache() :
- _rat_func_map_watermark(128), _rat_pair_map_watermark(128), _ak_ptr(NULL){};
+ _rat_func_map_watermark(128), _rat_pair_map_watermark(128), _ak_ptr(nullptr){};
void initialize(Algebraic_kernel_d_1* ak_ptr)
{
@@ -165,7 +165,7 @@ public:
const Rational_function& get_rational_function(const Polynomial_1& numer,
const Polynomial_1& denom) const
{
- CGAL_precondition (_ak_ptr != NULL);
+ CGAL_precondition (_ak_ptr != nullptr);
Rational_function_key key = get_key(numer,denom);
//look if element exists in cache already
@@ -204,7 +204,7 @@ public:
const Rational_function_pair get_rational_pair(const Rational_function& f,
const Rational_function& g) const
{
- CGAL_precondition (_ak_ptr != NULL);
+ CGAL_precondition (_ak_ptr != nullptr);
CGAL_precondition(!(f==g));
Rational_function_canonicalized_pair_key key = get_key(f,g);
bool is_opposite = (f.id() < g.id()) ? false : true ;
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h
index 96e57b266bf..a28df2d8d6d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h
@@ -47,7 +47,7 @@ public:
typedef typename Base::Solve_1 Solve_1;
public:
- Rational_function_rep() : _ak_ptr(NULL){}
+ Rational_function_rep() : _ak_ptr(nullptr){}
Rational_function_rep(const Polynomial_1& numer,
const Polynomial_1& denom,
Algebraic_kernel_d_1* ak_ptr):
@@ -117,7 +117,7 @@ public:
private:
void initialize()
{
- CGAL_precondition(_ak_ptr != NULL);
+ CGAL_precondition(_ak_ptr != nullptr);
CGAL_precondition(CGAL::is_zero(_denom) == false);
if (CGAL::is_zero(_numer))
{
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h
index 4610f48ef75..e4a4a261646 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h
@@ -59,7 +59,7 @@ public:
Algebraic_kernel_d_1* ak_ptr)
:_f(f),_g(g),_ak_ptr(ak_ptr)
{
- CGAL_precondition(_ak_ptr != NULL);
+ CGAL_precondition(_ak_ptr != nullptr);
//canonicalized representation
if ( !(f.id() < g.id()) )
std::swap(_f,_g);
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h
index dbbb0d264ff..ceb4e38defe 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h
@@ -39,14 +39,14 @@ public:
{
if(!m_pInstance)
m_pInstance = new T;
- CGAL_assertion(m_pInstance !=NULL);
+ CGAL_assertion(m_pInstance !=nullptr);
return m_pInstance;
}
static void DestroyInstance()
{
delete m_pInstance;
- m_pInstance = NULL;
+ m_pInstance = nullptr;
};
private:
Singleton(); // ctor hidden
@@ -55,7 +55,7 @@ private:
static T* m_pInstance;
};
-template T* Singleton::m_pInstance=NULL;
+template T* Singleton::m_pInstance=nullptr;
} // namespace Arr_rational_arc
} //namespace CGAL {
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h
index a2d3eab19c7..9fd2aaa6da1 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h
@@ -766,7 +766,7 @@ public:
// Check if we have a single intersection point.
const Point_2 *ip = object_cast (&obj);
- if (ip != NULL) {
+ if (ip != nullptr) {
// Check if the intersection point ip lies on both segments.
const bool ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
cv1.is_in_x_range(*ip);
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h
index b6dfc3ecc52..5e9b6c9b43c 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h
@@ -96,9 +96,9 @@ protected:
public:
/*! Default constructor. */
Arr_simple_point_location() :
- m_arr(NULL),
- m_geom_traits(NULL),
- m_topol_traits(NULL)
+ m_arr(nullptr),
+ m_geom_traits(nullptr),
+ m_topol_traits(nullptr)
{}
/*! Constructor given an arrangement. */
@@ -122,9 +122,9 @@ public:
/*! Detach from the current arrangement object. */
void detach()
{
- m_arr = NULL;
- m_geom_traits = NULL;
- m_topol_traits = NULL;
+ m_arr = nullptr;
+ m_geom_traits = nullptr;
+ m_topol_traits = nullptr;
}
/*!
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h
index 8a57cd28808..2989d7c98f9 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h
@@ -524,7 +524,7 @@ public:
/*! Constructor */
Arr_polyhedral_sgm_initializer(PolyhedralSgm& sgm) :
Base(sgm),
- m_visitor(NULL),
+ m_visitor(nullptr),
m_marked_vertex_index(0),
m_marked_edge_index(0),
m_marked_facet_index(0)
@@ -538,7 +538,7 @@ public:
* \param visitor
* \pre The polyhedron polyhedron does not have coplanar facets.
*/
- void operator()(Polyhedron& polyhedron, Visitor* visitor = NULL)
+ void operator()(Polyhedron& polyhedron, Visitor* visitor = nullptr)
{
#if 0
std::copy(polyhedron.points_begin(), polyhedron.points_end(),
@@ -568,7 +568,7 @@ public:
const CoordIndexIter indices_begin,
const CoordIndexIter indices_end,
size_type num_facets,
- Visitor* visitor = NULL)
+ Visitor* visitor = nullptr)
{
m_visitor = visitor;
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h
index a9935abc1b3..699197c835d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h
@@ -148,7 +148,7 @@ public:
typedef typename Base::Plane Plane;
/*! Constructor */
- Arr_polyhedral_sgm_polyhedron_3_face() : m_vertex(NULL), m_marked(false) {}
+ Arr_polyhedral_sgm_polyhedron_3_face() : m_vertex(nullptr), m_marked(false) {}
/*! Obtain the mutable plane. Delegate */
Plane & plane() { return Base::plane(); }
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h
index cf1825652c4..80cb65464f6 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h
@@ -213,7 +213,7 @@ void Arr_transform_on_sphere(Arrangement & arr,
ind = ARR_MAX_END;
// Check if it was already added.
- if (topol_traits->discontinuity_vertex(havc->curve(), ind)== NULL &&
+ if (topol_traits->discontinuity_vertex(havc->curve(), ind)== nullptr &&
topol_traits->south_pole() != &(*havc->target()) &&
topol_traits->north_pole() != &(*havc->target()) )
{
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h
index bf6412cab20..76025250e23 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h
@@ -139,7 +139,7 @@ private:
//! A container of boundary vertices.
struct Vertex_key_comparer {
/*! Construct default */
- Vertex_key_comparer() : m_geom_traits(NULL) {}
+ Vertex_key_comparer() : m_geom_traits(nullptr) {}
/*! Construct */
Vertex_key_comparer(const Gt_adaptor_2* geom_traits) :
@@ -297,7 +297,7 @@ public:
Vertex* north_pole() { return m_north_pole; }
/*! Obtain a vertex on the line of discontinuity that corresponds to
- * the given curve-end (or return NULL if no such vertex exists).
+ * the given curve-end (or return nullptr if no such vertex exists).
*/
Vertex* discontinuity_vertex(const X_monotone_curve_2 xc, Arr_curve_end ind)
{
@@ -305,7 +305,7 @@ public:
m_geom_traits->construct_min_vertex_2_object()(xc) :
m_geom_traits->construct_max_vertex_2_object()(xc);
typename Vertex_map::iterator it = m_boundary_vertices.find(key);
- return (it != m_boundary_vertices.end()) ? it->second : NULL;
+ return (it != m_boundary_vertices.end()) ? it->second : nullptr;
}
//@}
@@ -546,7 +546,7 @@ public:
{
// There are no fictitious halfedges:
CGAL_error();
- return NULL;
+ return nullptr;
}
/*! Determine whether the given face is unbounded.
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h
index 3e8444062e9..84092ea4e4a 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h
@@ -71,7 +71,7 @@ void Arr_bounded_planar_topology_traits_2::
dcel_updated()
{
// Go over the DCEL faces and locate the unbounded face.
- unb_face = NULL;
+ unb_face = nullptr;
typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
for (; fit != this->m_dcel.faces_end(); ++fit) {
if (fit->is_unbounded()) {
@@ -79,7 +79,7 @@ dcel_updated()
break;
}
}
- CGAL_assertion(unb_face != NULL);
+ CGAL_assertion(unb_face != nullptr);
}
} // namespace CGAL
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h
index 7125850b128..4d47b66e9c5 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h
@@ -79,8 +79,8 @@ public:
/*! Constructor. */
Arr_inc_insertion_zone_visitor () :
- p_arr (NULL),
- geom_traits (NULL),
+ p_arr (nullptr),
+ geom_traits (nullptr),
invalid_v (),
invalid_he ()
{}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h
index 59e3db12daa..dbaa6eefb1e 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h
@@ -110,9 +110,9 @@ public:
// Clear the DCEL.
m_dcel.delete_all();
- if (m_own_geom_traits && (m_geom_traits != NULL)) {
+ if (m_own_geom_traits && (m_geom_traits != nullptr)) {
delete m_geom_traits;
- m_geom_traits = NULL;
+ m_geom_traits = nullptr;
}
}
//@}
@@ -247,9 +247,9 @@ Arr_planar_topology_traits_base_2::assign(const Self& other)
m_dcel.assign(other.m_dcel);
// Take care of the traits object.
- if (m_own_geom_traits && (m_geom_traits != NULL)) {
+ if (m_own_geom_traits && (m_geom_traits != nullptr)) {
delete m_geom_traits;
- m_geom_traits = NULL;
+ m_geom_traits = nullptr;
}
if (other.m_own_geom_traits) m_geom_traits = new Traits_adaptor_2;
@@ -265,8 +265,8 @@ template
bool Arr_planar_topology_traits_base_2::
is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
{
- CGAL_precondition((v == NULL) || ! v->has_null_point());
- CGAL_precondition((v == NULL) ||
+ CGAL_precondition((v == nullptr) || ! v->has_null_point());
+ CGAL_precondition((v == nullptr) ||
m_geom_traits->equal_2_object()(p, v->point()));
// In case the face is unbounded and has no outer ccbs, this is the single
@@ -310,7 +310,7 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
do {
// Compare p to the target vertex of the current halfedge.
- // If the vertex v associated with p (if v is given and is not NULL)
+ // If the vertex v associated with p (if v is given and is not nullptr)
// on the boundary of the component, p is obviously not in the interior
// the component.
if (curr->vertex() == v) return false;
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h
index edab3a79727..943730b4ef7 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h
@@ -114,7 +114,7 @@ public:
Arr_spherical_construction_helper(Arrangement_2* arr) :
m_top_traits(arr->topology_traits()),
m_arr_access(*arr),
- m_he_ind_map_p(NULL)
+ m_he_ind_map_p(nullptr)
{}
/*! Destructor. */
@@ -172,7 +172,7 @@ public:
*/
void splice_indices_list(Halfedge_handle he)
{
- CGAL_assertion(m_he_ind_map_p != NULL);
+ CGAL_assertion(m_he_ind_map_p != nullptr);
Indices_list& list_ref = (*m_he_ind_map_p)[he];
list_ref.splice(list_ref.end(), m_subcurves_at_nf);
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h
index 3fbba7dd92b..5e6f978fb94 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h
@@ -36,9 +36,9 @@ namespace CGAL {
template
Arr_spherical_topology_traits_2::
Arr_spherical_topology_traits_2() :
- m_spherical_face(NULL),
- m_north_pole(NULL),
- m_south_pole(NULL),
+ m_spherical_face(nullptr),
+ m_north_pole(nullptr),
+ m_south_pole(nullptr),
m_own_geom_traits(true)
{
m_geom_traits = new Gt_adaptor_2;
@@ -49,9 +49,9 @@ Arr_spherical_topology_traits_2() :
template
Arr_spherical_topology_traits_2::
Arr_spherical_topology_traits_2(const Geometry_traits_2* traits) :
- m_spherical_face(NULL),
- m_north_pole(NULL),
- m_south_pole(NULL),
+ m_spherical_face(nullptr),
+ m_north_pole(nullptr),
+ m_south_pole(nullptr),
m_own_geom_traits(false)
{
m_geom_traits = static_cast(traits);
@@ -66,9 +66,9 @@ Arr_spherical_topology_traits_2::
// Clear the DCEL.
m_dcel.delete_all();
- if (m_own_geom_traits && (m_geom_traits != NULL)) {
+ if (m_own_geom_traits && (m_geom_traits != nullptr)) {
delete m_geom_traits;
- m_geom_traits = NULL;
+ m_geom_traits = nullptr;
}
}
@@ -82,9 +82,9 @@ assign(const Self& other)
m_dcel.assign(other.m_dcel);
// Take care of the traits object.
- if (m_own_geom_traits && m_geom_traits != NULL) {
+ if (m_own_geom_traits && m_geom_traits != nullptr) {
delete m_geom_traits;
- m_geom_traits = NULL;
+ m_geom_traits = nullptr;
}
if (other.m_own_geom_traits) {
@@ -109,8 +109,8 @@ void Arr_spherical_topology_traits_2::dcel_updated()
// Go over the DCEL vertices and locate the south and north pole (if any)
// and any other vertex on the line of discontinuity.
- m_north_pole = NULL;
- m_south_pole = NULL;
+ m_north_pole = nullptr;
+ m_south_pole = nullptr;
m_boundary_vertices.clear();
typename Dcel::Vertex_iterator vit = this->m_dcel.vertices_begin();
@@ -129,17 +129,17 @@ void Arr_spherical_topology_traits_2::dcel_updated()
// Go over the DCEL faces and locate the spherical face, which is the only
// face with no outer CCB.
- m_spherical_face = NULL;
+ m_spherical_face = nullptr;
typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
for (; fit != this->m_dcel.faces_end(); ++fit) {
if (fit->number_of_outer_ccbs() == 0) {
- CGAL_assertion(m_spherical_face == NULL);
+ CGAL_assertion(m_spherical_face == nullptr);
m_spherical_face = &(*fit);
break;
}
}
- CGAL_assertion(m_spherical_face != NULL);
+ CGAL_assertion(m_spherical_face != nullptr);
}
/*! \brief initializes an empty DCEL structure. */
@@ -156,8 +156,8 @@ void Arr_spherical_topology_traits_2::init_dcel()
m_spherical_face->set_unbounded(false);
m_spherical_face->set_fictitious(false);
- m_north_pole = NULL;
- m_south_pole = NULL;
+ m_north_pole = nullptr;
+ m_south_pole = nullptr;
}
/*! \brief determines whether a point lies in the interior of a given face. */
@@ -166,8 +166,8 @@ bool Arr_spherical_topology_traits_2::
is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
{
// std::cout << "is_in_face()" << std::endl;
- CGAL_precondition((v == NULL) || !v->has_null_point());
- CGAL_precondition((v == NULL) ||
+ CGAL_precondition((v == nullptr) || !v->has_null_point());
+ CGAL_precondition((v == nullptr) ||
m_geom_traits->equal_2_object()(p, v->point()));
/* There is always one face that contains everything else. It has no
@@ -183,12 +183,12 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
<< std::endl;
#endif
if (f->number_of_outer_ccbs() == 0) return true;
- if (((v != NULL) && (v->parameter_space_in_y() == ARR_TOP_BOUNDARY)) ||
+ if (((v != nullptr) && (v->parameter_space_in_y() == ARR_TOP_BOUNDARY)) ||
(m_geom_traits->parameter_space_in_y_2_object()(p) == ARR_TOP_BOUNDARY))
return false;
/*! \todo a temporary test
- * if (((v != NULL) && (v->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)) ||
+ * if (((v != nullptr) && (v->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)) ||
* (p.is_min_boundary()))
* return false;
*/
@@ -536,12 +536,12 @@ place_boundary_vertex(Face* /* f */,
{
// std::cout << "place_boundary_vertex()" << std::endl;
if (ps_y == ARR_BOTTOM_BOUNDARY) {
- if (m_south_pole == NULL) return Object();
+ if (m_south_pole == nullptr) return Object();
return CGAL::make_object(m_south_pole);
}
if (ps_y == ARR_TOP_BOUNDARY) {
- if (m_north_pole == NULL) return Object();
+ if (m_north_pole == nullptr) return Object();
return CGAL::make_object(m_north_pole);
}
@@ -608,18 +608,18 @@ locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind,
// In case the curve end coincides with the north pole, return the vertex
// representing the north pole, if one exists. Otherwise, return the face
// containing this pole (the spherical face).
- if (m_north_pole != NULL) return CGAL::make_object(m_north_pole);
+ if (m_north_pole != nullptr) return CGAL::make_object(m_north_pole);
return CGAL::make_object(m_spherical_face);
}
typename Vertex_map::iterator it;
- Vertex* v = NULL;
+ Vertex* v = nullptr;
if (ps_y == ARR_BOTTOM_BOUNDARY) {
// In case the curve end coincides with the south pole, return the vertex
// representing the south pole, if one exists. Otherwise, search for the
// face containing this pole.
- if (m_south_pole != NULL) return CGAL::make_object(m_south_pole);
+ if (m_south_pole != nullptr) return CGAL::make_object(m_south_pole);
it = m_boundary_vertices.begin();
}
else {
@@ -655,7 +655,7 @@ locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind,
template
bool Arr_spherical_topology_traits_2::
is_redundant(const Vertex* v) const
-{ return (v->halfedge() == NULL); }
+{ return (v->halfedge() == nullptr); }
/* \brief erases a given redundant vertex */
template
@@ -665,17 +665,17 @@ erase_redundant_vertex(Vertex* v)
{
const Arr_parameter_space ps_y = v->parameter_space_in_y();
if (ps_y == ARR_BOTTOM_BOUNDARY) {
- m_south_pole = NULL;
- return NULL;
+ m_south_pole = nullptr;
+ return nullptr;
}
if (ps_y == ARR_TOP_BOUNDARY) {
- m_north_pole = NULL;
- return NULL;
+ m_north_pole = nullptr;
+ return nullptr;
}
CGAL_assertion_code(Arr_parameter_space ps_x = v->parameter_space_in_x());
CGAL_assertion(ps_x != ARR_INTERIOR);
m_boundary_vertices.erase(v->point());
- return NULL;
+ return nullptr;
}
/*! \brief obtains the curve associated with a boundary vertex */
@@ -703,12 +703,12 @@ _locate_around_vertex_on_discontinuity(Vertex* v,
Arr_curve_end ind) const
{
// If the vertex is isolated, there is no predecssor halfedge.
- if (v->is_isolated()) return NULL;
+ if (v->is_isolated()) return nullptr;
// Get the first incident halfedge around v and the next halfedge.
Halfedge* first = v->halfedge();
Halfedge* curr = first;
- CGAL_assertion(curr != NULL);
+ CGAL_assertion(curr != nullptr);
Halfedge* next = curr->next()->opposite();
// If is only one halfedge incident to v, return this halfedge as xc's
@@ -756,12 +756,12 @@ _locate_around_pole(Vertex* v,
// std::cout << "locate_around_pole() " << ind << std::endl;
// If the vertex is isolated, return a null halfedge:
- if (v->is_isolated()) return NULL;
+ if (v->is_isolated()) return nullptr;
// Get the first incident halfedge around v and the next halfedge:
Halfedge* first = v->halfedge();
Halfedge* curr = first;
- CGAL_assertion(curr != NULL);
+ CGAL_assertion(curr != nullptr);
Halfedge* next = curr->next()->opposite();
// If there is only one halfedge, it is the predecessor, return it:
@@ -809,7 +809,7 @@ _locate_around_pole(Vertex* v,
// We sould never reach here:
CGAL_error();
- return NULL;
+ return nullptr;
}
/*! \brief Return the face that lies below the given vertex, which lies
@@ -826,7 +826,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
// Get the first incident halfedge around v and the next halfedge.
Halfedge* first = v->halfedge();
Halfedge* curr = first;
- CGAL_assertion(curr != NULL);
+ CGAL_assertion(curr != nullptr);
Halfedge* next = curr->next()->opposite();
// If there is only one halfedge incident to v, return its incident face.
@@ -842,8 +842,8 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
typename Gt_adaptor_2::Compare_y_at_x_left_2 cmp_y_at_x_op_left =
m_geom_traits->compare_y_at_x_left_2_object();
- Halfedge* lowest_left = NULL;
- Halfedge* top_right = NULL;
+ Halfedge* lowest_left = nullptr;
+ Halfedge* top_right = nullptr;
do {
// Check whether the current halfedge is defined to the left or to the
@@ -851,7 +851,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
if (curr->direction() == ARR_LEFT_TO_RIGHT) {
// The curve associated with the current halfedge is defined to the left
// of v.
- if (lowest_left == NULL ||
+ if (lowest_left == nullptr ||
cmp_y_at_x_op_left(curr->curve(), lowest_left->curve(), v->point())
== SMALLER)
{
@@ -861,7 +861,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
else {
// The curve associated with the current halfedge is defined to the right
// of v.
- if (top_right == NULL ||
+ if (top_right == nullptr ||
cmp_y_at_x_op_right(curr->curve(), top_right->curve(), v->point()) ==
LARGER)
{
@@ -878,7 +878,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
// right. Note that as the halfedge we located has v as its target, we now
// have to return its twin.
first =
- (lowest_left != NULL) ? lowest_left->opposite() : top_right->opposite();
+ (lowest_left != nullptr) ? lowest_left->opposite() : top_right->opposite();
// std::cout << "first: " << first->opposite()->vertex()->point() << " => "
// << first->vertex()->point() << std::endl;
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h
index a4c3067172d..849f6ba9935 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h
@@ -114,14 +114,14 @@ public:
void Arr_spherical_vert_decomp_helper::before_sweep()
{
// Get the north pole and the face that intially contains it.
- m_valid_north_pole = (m_top_traits->north_pole() != NULL);
+ m_valid_north_pole = (m_top_traits->north_pole() != nullptr);
if (m_valid_north_pole)
m_north_pole = Vertex_const_handle (m_top_traits->north_pole());
m_north_face = Face_const_handle (m_top_traits->spherical_face());
// Get the south pole and the face that intially contains it.
- m_valid_south_pole = (m_top_traits->south_pole() != NULL);
+ m_valid_south_pole = (m_top_traits->south_pole() != nullptr);
if (m_valid_south_pole)
m_south_pole = Vertex_const_handle (m_top_traits->south_pole());
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h
index d544d8ab8ef..6212260a673 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h
@@ -116,9 +116,9 @@ public:
Arr_unb_planar_construction_helper(Arrangement_2* arr) :
m_top_traits(arr->topology_traits()),
m_arr_access(*arr),
- m_prev_minus_inf_x_event(NULL),
- m_prev_plus_inf_y_event(NULL),
- m_he_ind_map_p(NULL)
+ m_prev_minus_inf_x_event(nullptr),
+ m_prev_plus_inf_y_event(nullptr),
+ m_he_ind_map_p(nullptr)
{}
/*! Destructor. */
@@ -155,7 +155,7 @@ public:
// The last event at y = +oo may be deallocated if it has no incident
// right subcurves, so we should not keep a pointer to it.
if (event == m_prev_plus_inf_y_event)
- m_prev_plus_inf_y_event = NULL;
+ m_prev_plus_inf_y_event = nullptr;
}
//@}
@@ -278,7 +278,7 @@ before_handle_event(Event* event)
// Update the incident halfedge of the previous vertex at x = -oo
// (m_lh used to be incident to it, but now we have split it).
- if (m_prev_minus_inf_x_event != NULL)
+ if (m_prev_minus_inf_x_event != nullptr)
m_prev_minus_inf_x_event->set_halfedge_handle(m_lh->next());
m_prev_minus_inf_x_event = event;
return;
@@ -311,13 +311,13 @@ before_handle_event(Event* event)
// Update the incident halfedge of the previous vertex at y = +oo
// (m_th used to be incident to it, but now we have split it).
- if (m_prev_plus_inf_y_event != NULL)
+ if (m_prev_plus_inf_y_event != nullptr)
m_prev_plus_inf_y_event->set_halfedge_handle(m_th->next());
m_prev_plus_inf_y_event = event;
// Associate all curve indices of subcurves that "see" m_th from
// below with the left portion of the split halfedge (m_th->next()).
- if (m_he_ind_map_p != NULL)
+ if (m_he_ind_map_p != nullptr)
{
Indices_list& list_ref = (*m_he_ind_map_p)[m_th->next()];
list_ref.clear();
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h
index 0e39819d2dd..529e4e3bed5 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h
@@ -187,7 +187,7 @@ before_handle_event(Event* event)
if (ps_x == ARR_LEFT_BOUNDARY) {
// The event lies on the left fictitious halfedge.
this->m_lh = this->m_lh->twin()->next()->twin();
- this->m_prev_minus_inf_x_event = NULL;
+ this->m_prev_minus_inf_x_event = nullptr;
}
else if (ps_x == ARR_RIGHT_BOUNDARY) {
// The event lies on the right fictitious halfedge.
@@ -204,7 +204,7 @@ before_handle_event(Event* event)
// The event lies on the top fictitious halfedge.
CGAL_assertion (ps_y == ARR_TOP_BOUNDARY);
this->m_th = this->m_th->twin()->next()->twin();
- this->m_prev_plus_inf_y_event = NULL;
+ this->m_prev_plus_inf_y_event = nullptr;
}
}
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h
index caa5a6dc9e6..e0baac1bd89 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h
@@ -40,12 +40,12 @@ template
Arr_unb_planar_topology_traits_2::
Arr_unb_planar_topology_traits_2():
Base(),
- v_bl(NULL),
- v_tl(NULL),
- v_br(NULL),
- v_tr(NULL),
+ v_bl(nullptr),
+ v_tl(nullptr),
+ v_br(nullptr),
+ v_tr(nullptr),
n_inf_verts(0),
- fict_face(NULL)
+ fict_face(nullptr)
{}
//-----------------------------------------------------------------------------
@@ -55,12 +55,12 @@ template
Arr_unb_planar_topology_traits_2::
Arr_unb_planar_topology_traits_2 (const Geometry_traits_2 * geom_traits) :
Base (geom_traits),
- v_bl (NULL),
- v_tl (NULL),
- v_br (NULL),
- v_tr (NULL),
+ v_bl (nullptr),
+ v_tl (nullptr),
+ v_br (nullptr),
+ v_tr (nullptr),
n_inf_verts (0),
- fict_face (NULL)
+ fict_face (nullptr)
{}
//-----------------------------------------------------------------------------
@@ -89,7 +89,7 @@ void Arr_unb_planar_topology_traits_2::dcel_updated ()
typename Dcel::Vertex_iterator vit;
Halfedge *first_he, *next_he;
- v_bl = v_tl = v_br = v_tr = NULL;
+ v_bl = v_tl = v_br = v_tr = nullptr;
n_inf_verts = 0;
for (vit = this->m_dcel.vertices_begin();
vit != this->m_dcel.vertices_end(); ++vit)
@@ -123,23 +123,23 @@ void Arr_unb_planar_topology_traits_2::dcel_updated ()
CGAL_error();
}
}
- CGAL_assertion(v_bl != NULL && v_tl != NULL && v_br != NULL && v_tr != NULL);
+ CGAL_assertion(v_bl != nullptr && v_tl != nullptr && v_br != nullptr && v_tr != nullptr);
// Go over the DCEL faces and locate the fictitious face.
typename Dcel::Face_iterator fit;
- fict_face = NULL;
+ fict_face = nullptr;
for (fit = this->m_dcel.faces_begin();
fit != this->m_dcel.faces_end(); ++fit)
{
if (fit->is_fictitious())
{
- CGAL_assertion (fict_face == NULL);
+ CGAL_assertion (fict_face == nullptr);
fict_face = &(*fit);
}
}
- CGAL_assertion (fict_face != NULL);
+ CGAL_assertion (fict_face != nullptr);
return;
}
@@ -200,10 +200,10 @@ void Arr_unb_planar_topology_traits_2::init_dcel ()
Inner_ccb *ic = this->m_dcel.new_inner_ccb();
Face *in_f = this->m_dcel.new_face();
- he1->set_curve (NULL);
- he2->set_curve (NULL);
- he3->set_curve (NULL);
- he4->set_curve (NULL);
+ he1->set_curve (nullptr);
+ he2->set_curve (nullptr);
+ he3->set_curve (nullptr);
+ he4->set_curve (nullptr);
he1->set_next (he2); he1_t->set_next (he4_t);
he2->set_next (he3); he4_t->set_next (he3_t);
@@ -272,7 +272,7 @@ are_equal(const Vertex *v,
Arr_curve_end v_ind;
const X_monotone_curve_2 *v_cv = _curve (v, v_ind);
- if (v_cv == NULL)
+ if (v_cv == nullptr)
return (v->parameter_space_in_x() == ps_x &&
v->parameter_space_in_y() == ps_y);
@@ -287,7 +287,7 @@ are_equal(const Vertex *v,
Arr_curve_end v_ind;
const X_monotone_curve_2 *v_cv = _curve (v, v_ind);
- if (v_cv == NULL)
+ if (v_cv == nullptr)
return (v->parameter_space_in_x() == ARR_INTERIOR &&
v->parameter_space_in_y() == ps_y);
@@ -555,23 +555,23 @@ erase_redundant_vertex (Vertex *v)
// Keep pointers to the components that contain two halfedges he3 and he2,
// pointing at the end vertices of the merged halfedge.
- Inner_ccb *ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : NULL;
- Outer_ccb *oc1 = (ic1 == NULL) ? he3->outer_ccb() : NULL;
- Inner_ccb *ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : NULL;
- Outer_ccb *oc2 = (ic2 == NULL) ? he4->outer_ccb() : NULL;
+ Inner_ccb *ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : nullptr;
+ Outer_ccb *oc1 = (ic1 == nullptr) ? he3->outer_ccb() : nullptr;
+ Inner_ccb *ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : nullptr;
+ Outer_ccb *oc2 = (ic2 == nullptr) ? he4->outer_ccb() : nullptr;
// As he1 and he2 will evetually represent the merged edge, while he3 and he4
// will be deleted, check if the deleted halfedges are represantatives of a
// face boundary or a hole inside these faces. If so, replace he3 by he1 and
// he4 by he2.
- if (ic1 != NULL && ic1->halfedge() == he3)
+ if (ic1 != nullptr && ic1->halfedge() == he3)
ic1->set_halfedge (he1);
- else if (oc1 != NULL && oc1->halfedge() == he3)
+ else if (oc1 != nullptr && oc1->halfedge() == he3)
oc1->set_halfedge (he1);
- if (ic2 != NULL && ic2->halfedge() == he4)
+ if (ic2 != nullptr && ic2->halfedge() == he4)
ic2->set_halfedge (he2);
- else if (oc2 != NULL && oc2->halfedge() == he4)
+ else if (oc2 != nullptr && oc2->halfedge() == he4)
oc2->set_halfedge (he2);
// If he3 is the incident halfedge to its target, replace it by he1.
@@ -625,7 +625,7 @@ compare_x (const Point_2& p, const Vertex* v) const
Arr_curve_end v_ind = ARR_MIN_END;
const X_monotone_curve_2* v_cv = _curve (v, v_ind);
- CGAL_assertion(v_cv != NULL);
+ CGAL_assertion(v_cv != nullptr);
return
(this->m_geom_traits->compare_x_point_curve_end_2_object()(p, *v_cv,
v_ind));
@@ -659,7 +659,7 @@ compare_xy (const Point_2& p, const Vertex* v) const
Arr_curve_end v_ind = ARR_MIN_END;
const X_monotone_curve_2* v_cv = _curve (v, v_ind);
- CGAL_assertion (v_cv != NULL);
+ CGAL_assertion (v_cv != nullptr);
Comparison_result res =
this->m_geom_traits->compare_x_point_curve_end_2_object() (p, *v_cv,
@@ -724,7 +724,7 @@ _curve (const Vertex* v, Arr_curve_end& ind) const
he = he->next()->opposite();
// No incident curve were found:
- if (he == v->halfedge()) return (NULL);
+ if (he == v->halfedge()) return (nullptr);
}
// The halfedge he is directed toward v, so if it is directed from left to
@@ -844,7 +844,7 @@ _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind,
// arrangement, but it hasn't been associated with a valid halfedge
// yet, as the insertion process is still ongoing.
// The comparison result in this case is trivial.
- if (v_cv1 != NULL) {
+ if (v_cv1 != nullptr) {
res1 =
this->m_geom_traits->compare_x_curve_ends_2_object()(cv, ind,
*v_cv1, v_ind);
@@ -878,7 +878,7 @@ _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind,
// arrangement, but it hasn't been associated with a valid halfedge
// yet, as the insertion process is still ongoing.
// The comparison result in this case is trivial.
- if (v_cv2 != NULL) {
+ if (v_cv2 != nullptr) {
res2 =
this->m_geom_traits->compare_x_curve_ends_2_object()(cv, ind,
*v_cv2, v_ind);
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h
index 8fcd8f42684..594e3fb0733 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h
@@ -148,7 +148,7 @@ public:
Arr_trapezoid_ric_point_location (bool with_guarantees = true,
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD)
- : m_traits (NULL), m_with_guarantees(with_guarantees)
+ : m_traits (nullptr), m_with_guarantees(with_guarantees)
{
td.set_with_guarantees(with_guarantees);
td.depth_threshold(depth_thrs);
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h
index 6a606cdc2ae..fa3db1291c4 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h
@@ -129,7 +129,7 @@ protected:
public:
/*! Default constructor. */
Arr_triangulation_point_location() :
- m_traits(NULL),
+ m_traits(nullptr),
m_ignore_notifications(false),
m_ignore_remove_edge(false)
{}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h
index df288fae935..943351941ef 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h
@@ -342,7 +342,7 @@ public:
Arr_parameter_space /* ps_y */) const
{
CGAL_error();
- return (NULL);
+ return (nullptr);
}
/*! Locate a DCEL feature that contains the given unbounded curve end.
@@ -492,7 +492,7 @@ protected:
* \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end;
* ARR_MAX_END if it is induced by the curve's maximal end.
* \pre v is a valid (not fictitious) boundary.
- * \return The curve that induces v, or NULL if v has no incident curves yet.
+ * \return The curve that induces v, or nullptr if v has no incident curves yet.
*/
const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const;
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h
index 4f5ccf3f8eb..0e636df9252 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h
@@ -87,9 +87,9 @@ protected:
public:
/*! Default constructor. */
Arr_walk_along_line_point_location() :
- p_arr(NULL),
- geom_traits(NULL),
- top_traits(NULL)
+ p_arr(nullptr),
+ geom_traits(nullptr),
+ top_traits(nullptr)
{}
/*! Constructor given an arrangement. */
@@ -113,9 +113,9 @@ public:
/*! Detach from the current arrangement object. */
void detach()
{
- p_arr = NULL;
- geom_traits = NULL;
- top_traits = NULL;
+ p_arr = nullptr;
+ geom_traits = nullptr;
+ top_traits = nullptr;
}
/*!
diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h
index c686a0f553c..69b9327e335 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h
@@ -110,7 +110,7 @@ void insert(Arrangement_on_surface_2& arr,
// Act according to the type of the current object.
x_curve = object_cast(&(*obj_iter));
- if (x_curve != NULL) {
+ if (x_curve != nullptr) {
// Inserting an x-monotone curve:
// Initialize the zone-computation object with the given curve.
arr_zone.init(*x_curve, pl);
@@ -128,7 +128,7 @@ void insert(Arrangement_on_surface_2& arr,
}
else {
iso_p = object_cast(&(*obj_iter));
- CGAL_assertion(iso_p != NULL);
+ CGAL_assertion(iso_p != nullptr);
// Inserting a point into the arrangement:
insert_point(arr, *iso_p, pl);
@@ -680,7 +680,7 @@ insert_non_intersecting_curve
const Arr_parameter_space by1 =
geom_traits->parameter_space_in_y_2_object()(c, ARR_MIN_END);
CGAL::Object obj1;
- const Vertex_const_handle* vh1 = NULL;
+ const Vertex_const_handle* vh1 = nullptr;
if ((bx1 == ARR_INTERIOR) && (by1 == ARR_INTERIOR)) {
// We have a normal left endpoint with no boundary conditions:
@@ -690,7 +690,7 @@ insert_non_intersecting_curve
// The endpoint must not lie on an existing edge, but may coincide with
// and existing vertex vh1.
CGAL_precondition_msg
- (object_cast(&obj1) == NULL,
+ (object_cast(&obj1) == nullptr,
"The curve must not intersect an existing edge.");
vh1 = object_cast(&obj1);
@@ -701,7 +701,7 @@ insert_non_intersecting_curve
obj1 = arr_access.locate_curve_end(c, ARR_MIN_END, bx1, by1);
CGAL_precondition_msg
- (object_cast(&obj1) == NULL,
+ (object_cast(&obj1) == nullptr,
"The curve must not overlap an existing edge.");
vh1 = object_cast(&obj1);
@@ -714,7 +714,7 @@ insert_non_intersecting_curve
const Arr_parameter_space by2 =
geom_traits->parameter_space_in_y_2_object()(c, ARR_MAX_END);
CGAL::Object obj2;
- const Vertex_const_handle* vh2 = NULL;
+ const Vertex_const_handle* vh2 = nullptr;
if ((bx2 == ARR_INTERIOR) && (by2 == ARR_INTERIOR)) {
// We have a normal right endpoint with no boundary conditions:
@@ -724,7 +724,7 @@ insert_non_intersecting_curve
// The endpoint must not lie on an existing edge, but may coincide with
// and existing vertex vh2.
CGAL_precondition_msg
- (object_cast(&obj2) == NULL,
+ (object_cast(&obj2) == nullptr,
"The curve must not intersect an existing edge.");
vh2 = object_cast(&obj2);
@@ -739,7 +739,7 @@ insert_non_intersecting_curve
obj2 = arr_access.locate_curve_end(c, ARR_MAX_END, bx2, by2);
CGAL_precondition_msg
- (object_cast(&obj2) == NULL,
+ (object_cast(&obj2) == nullptr,
"The curve must not overlap an existing edge.");
vh2 = object_cast(&obj2);
@@ -754,8 +754,8 @@ insert_non_intersecting_curve
// accordingly.
typename Arr::Halfedge_handle new_he;
- if (vh1 != NULL) {
- if (vh2 != NULL) {
+ if (vh1 != nullptr) {
+ if (vh2 != nullptr) {
// Both endpoints are associated with a existing vertices.
// In this case insert_at_vertices() already returns a halfedge
// directed from left to right.
@@ -772,7 +772,7 @@ insert_non_intersecting_curve
}
}
else {
- if (vh2 != NULL) {
+ if (vh2 != nullptr) {
// Only the right endpoint is associated with an existing vertex.
// In this case insert_from_left_vertex() returns a halfedge directed
// to the new vertex it creates, so it is directed from right to left
@@ -797,10 +797,10 @@ insert_non_intersecting_curve
// << (*fh2)->number_of_outer_ccbs() << std::endl;
CGAL_assertion_msg
- ((fh1 != NULL) && (fh2 != NULL) && ((*fh1) == (*fh2)),
+ ((fh1 != nullptr) && (fh2 != nullptr) && ((*fh1) == (*fh2)),
"The curve intersects the interior of existing edges.");
- if ((fh1 != NULL) && (fh2 != NULL) && (*fh1 == *fh2)) {
+ if ((fh1 != nullptr) && (fh2 != nullptr) && (*fh1 == *fh2)) {
new_he = arr.insert_in_face_interior(c, arr.non_const_handle (*fh1));
}
}
@@ -1164,13 +1164,13 @@ insert_point(Arrangement_on_surface_2& arr,
arr_access.notify_before_global_change();
- if ((fh = object_cast(&obj)) != NULL) {
+ if ((fh = object_cast(&obj)) != nullptr) {
// p lies inside a face: Insert it as an isolated vertex it the interior of
// this face.
vh_for_p = arr.insert_in_face_interior(p, arr.non_const_handle (*fh));
}
else if ((hh = object_cast(&obj)) !=
- NULL)
+ nullptr)
{
// p lies in the interior of an edge: Split this edge to create a new
// vertex associated with p.
@@ -1189,7 +1189,7 @@ insert_point(Arrangement_on_surface_2& arr,
// In this case p lies on an existing vertex, so we just update this
// vertex.
vh = object_cast(&obj);
- CGAL_assertion (vh != NULL);
+ CGAL_assertion (vh != nullptr);
vh_for_p = arr.modify_vertex (arr.non_const_handle (*vh), p);
}
@@ -1634,20 +1634,20 @@ do_intersect(Arrangement_on_surface_2& arr,
for (obj_iter = x_objects.begin(); obj_iter != x_objects.end(); ++obj_iter) {
// Act according to the type of the current object.
x_curve = object_cast(&(*obj_iter));
- if (x_curve != NULL) {
+ if (x_curve != nullptr) {
// Check if the x-monotone subcurve intersects the arrangement.
if (do_intersect(arr, *x_curve, pl) == true)
return true;
}
else {
iso_p = object_cast(&(*obj_iter));
- CGAL_assertion(iso_p != NULL);
+ CGAL_assertion(iso_p != nullptr);
// Check whether the isolated point lies inside a face (otherwise,
// it conincides with a vertex or an edge).
CGAL::Object obj = pl.locate (*iso_p);
- return (object_cast(&obj) != NULL);
+ return (object_cast(&obj) != nullptr);
}
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
index 4dfa5df1734..d18d5ea3756 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
@@ -96,7 +96,7 @@ Arrangement_on_surface_2::Arrangement_on_surface_2() :
template
Arrangement_on_surface_2::
Arrangement_on_surface_2(const Self& arr) :
- m_geom_traits(NULL),
+ m_geom_traits(nullptr),
m_own_traits(false)
{
assign(arr);
@@ -206,9 +206,9 @@ void Arrangement_on_surface_2::assign(const Self& arr)
}
// Take care of the traits object.
- if (m_own_traits && (m_geom_traits != NULL)) {
+ if (m_own_traits && (m_geom_traits != nullptr)) {
delete m_geom_traits;
- m_geom_traits = NULL;
+ m_geom_traits = nullptr;
}
m_geom_traits = (arr.m_own_traits) ? new Traits_adaptor_2 : arr.m_geom_traits;
@@ -237,9 +237,9 @@ Arrangement_on_surface_2::~Arrangement_on_surface_2()
_delete_curve(eit->curve());
// Free the traits object, if necessary.
- if (m_own_traits && (m_geom_traits != NULL)) {
+ if (m_own_traits && (m_geom_traits != nullptr)) {
delete m_geom_traits;
- m_geom_traits = NULL;
+ m_geom_traits = nullptr;
}
// Detach all observers still attached to the arrangement.
@@ -333,7 +333,7 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
const Arr_parameter_space ps_y1 =
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
- DHalfedge* fict_prev1 = NULL;
+ DHalfedge* fict_prev1 = nullptr;
DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
// The curve has a valid left endpoint: Create a new vertex associated
@@ -349,7 +349,7 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
const Arr_parameter_space ps_y2 =
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
- DHalfedge* fict_prev2 = NULL;
+ DHalfedge* fict_prev2 = nullptr;
DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
// The curve has a valid right endpoint: Create a new vertex associated
@@ -363,15 +363,15 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
// lexicographically smaller than v2).
DHalfedge* new_he;
- if ((fict_prev1 == NULL) && (fict_prev2 == NULL))
+ if ((fict_prev1 == nullptr) && (fict_prev2 == nullptr))
// Both vertices represent valid points.
new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
- else if ((fict_prev1 == NULL) && (fict_prev2 != NULL)) {
+ else if ((fict_prev1 == nullptr) && (fict_prev2 != nullptr)) {
// v1 represents a valid point and v2 is inserted using its predecessor.
new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
new_he = new_he->opposite();
}
- else if ((fict_prev1 != NULL) && (fict_prev2 == NULL))
+ else if ((fict_prev1 != nullptr) && (fict_prev2 == nullptr))
// v1 is inserted using its predecessor and v2 represents a valid point.
new_he = _insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
else {
@@ -455,8 +455,8 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
const Arr_parameter_space ps_y2 =
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
- DVertex* v2 = NULL;
- DHalfedge* fict_prev2 = NULL;
+ DVertex* v2 = nullptr;
+ DHalfedge* fict_prev2 = nullptr;
if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR))
// The curve has a valid right endpoint: Create a new vertex associated
@@ -469,8 +469,8 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
// The given vertex is an isolated one: We should in fact insert the curve
// in the interior of the face containing this vertex.
DVertex* v1 = _vertex(v);
- DIso_vertex* iv = NULL;
- DFace* p_f = NULL;
+ DIso_vertex* iv = nullptr;
+ DFace* p_f = nullptr;
if (v->is_isolated()) {
// Obtain the face from the isolated vertex.
@@ -485,13 +485,13 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
// If the vertex that corresponds to cv's right end has boundary
// conditions, create it now.
- if (v2 == NULL)
+ if (v2 == nullptr)
// Locate the DCEL features that will be used for inserting the curve's
// right end.
v2 = _place_and_set_curve_end(p_f, cv, ARR_MAX_END, ps_x2, ps_y2,
&fict_prev2);
- if (iv != NULL) {
+ if (iv != nullptr) {
// Remove the isolated vertex v1, as it will not be isolated any more.
p_f->erase_isolated_vertex(iv);
_dcel().delete_isolated_vertex(iv);
@@ -500,7 +500,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
// Create the edge connecting the two vertices (note that we know that
// v1 is smaller than v2).
DHalfedge* new_he;
- if (fict_prev2 == NULL)
+ if (fict_prev2 == nullptr)
new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
else {
new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
@@ -516,7 +516,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
// which the new curve should be inserted.
DHalfedge* prev1 = _locate_around_vertex(_vertex(v), cv, ARR_MIN_END);
CGAL_assertion_msg
- (prev1 != NULL,
+ (prev1 != nullptr,
"The inserted curve cannot be located in the arrangement.");
DFace* f1 = prev1->is_on_inner_ccb() ? prev1->inner_ccb()->face() :
@@ -524,7 +524,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
// If the vertex that corresponds to cv's right end has boundary conditions,
// create it now.
- if (v2 == NULL)
+ if (v2 == nullptr)
// Locate the DCEL features that will be used for inserting the curve's
// right end.
v2 =
@@ -534,7 +534,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
// than v2).
DHalfedge* new_he;
- if (fict_prev2 == NULL)
+ if (fict_prev2 == nullptr)
// Insert the halfedge given the predecessor halfedge of v1.
new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
else {
@@ -617,7 +617,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev)
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
const Arr_parameter_space ps_y2 =
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
- DHalfedge* fict_prev2 = NULL;
+ DHalfedge* fict_prev2 = nullptr;
DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
// The curve has a valid right endpoint: Create a new vertex associated
@@ -631,7 +631,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev)
// than v2).
DHalfedge* new_he;
- if (fict_prev2 == NULL)
+ if (fict_prev2 == nullptr)
// Insert the halfedge given the predecessor halfedge of the left vertex.
new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
else {
@@ -693,8 +693,8 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
const Arr_parameter_space ps_y1 =
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
- DVertex* v1 = NULL;
- DHalfedge* fict_prev1 = NULL;
+ DVertex* v1 = nullptr;
+ DHalfedge* fict_prev1 = nullptr;
if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR))
// The curve has a valid left endpoint: Create a new vertex associated
@@ -707,8 +707,8 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
// The given vertex is an isolated one: We should in fact insert the curve
// in the interior of the face containing this vertex.
DVertex* v2 = _vertex(v);
- DIso_vertex* iv = NULL;
- DFace* p_f = NULL;
+ DIso_vertex* iv = nullptr;
+ DFace* p_f = nullptr;
if (v->is_isolated()) {
// Obtain the face from the isolated vertex.
@@ -723,13 +723,13 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
// If the vertex that corresponds to cv's left end has boundary
// conditions, create it now.
- if (v1 == NULL)
+ if (v1 == nullptr)
// Locate the DCEL features that will be used for inserting the curve's
// left end.
v1 = _place_and_set_curve_end(p_f, cv, ARR_MIN_END, ps_x1, ps_y1,
&fict_prev1);
- if (iv != NULL) {
+ if (iv != nullptr) {
// Remove the isolated vertex v2, as it will not be isolated any more.
p_f->erase_isolated_vertex(iv);
_dcel().delete_isolated_vertex(iv);
@@ -737,7 +737,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
// Create the edge connecting the two vertices (note that we know that
// v1 is smaller than v2).
- DHalfedge* new_he = (fict_prev1 == NULL) ?
+ DHalfedge* new_he = (fict_prev1 == nullptr) ?
_insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2) :
_insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
@@ -750,14 +750,14 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
// which the new curve should be inserted.
DHalfedge* prev2 = _locate_around_vertex(_vertex(v), cv, ARR_MAX_END);
CGAL_assertion_msg
- (prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
+ (prev2 != nullptr, "The inserted curve cannot be located in the arrangement.");
DFace* f2 = prev2->is_on_inner_ccb() ? prev2->inner_ccb()->face() :
prev2->outer_ccb()->face();
// If the vertex that corresponds to cv's left end has boundary conditions,
// create it now.
- if (v1 == NULL)
+ if (v1 == nullptr)
// Locate the DCEL features that will be used for inserting the curve's
// left end.
v1 =
@@ -767,7 +767,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
// than v1).
DHalfedge* new_he;
- if (fict_prev1 == NULL)
+ if (fict_prev1 == nullptr)
// Insert the halfedge given the predecessor halfedge of v2.
new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
else {
@@ -852,7 +852,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
const Arr_parameter_space ps_y1 =
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
- DHalfedge* fict_prev1 = NULL;
+ DHalfedge* fict_prev1 = nullptr;
DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
// The curve has a valid left endpoint: Create a new vertex associated
@@ -866,7 +866,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
// than v1).
DHalfedge* new_he;
- if (fict_prev1 == NULL)
+ if (fict_prev1 == nullptr)
// Insert the halfedge given the predecessor halfedge of the right vertex.
new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
else {
@@ -1023,8 +1023,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
if (v1->degree() == 0) {
// Get the face containing the isolated vertex v1.
DVertex* p_v1 = _vertex(v1);
- DIso_vertex* iv1 = NULL;
- DFace* f1 = NULL;
+ DIso_vertex* iv1 = nullptr;
+ DFace* f1 = nullptr;
if (p_v1->is_isolated()) {
// Obtain the containing face from the isolated vertex record.
@@ -1041,8 +1041,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
// Both end-vertices are isolated. Make sure they are contained inside
// the same face.
DVertex* p_v2 = _vertex(v2);
- DIso_vertex* iv2 = NULL;
- DFace* f2 = NULL;
+ DIso_vertex* iv2 = nullptr;
+ DFace* f2 = nullptr;
if (p_v2->is_isolated()) {
// Obtain the containing face from the isolated vertex record.
@@ -1050,14 +1050,14 @@ insert_at_vertices(const X_monotone_curve_2& cv,
f2 = iv2->face();
CGAL_assertion_msg
- ((f1 == NULL) || (f1 == f2),
+ ((f1 == nullptr) || (f1 == f2),
"The two isolated vertices must be located inside the same face.");
// Remove the isolated vertex v2, as it will not be isolated any more.
f2->erase_isolated_vertex(iv2);
_dcel().delete_isolated_vertex(iv2);
}
- else if (f1 == NULL)
+ else if (f1 == nullptr)
// In this case the containing face must be given by the user.
CGAL_precondition(f != Face_handle());
@@ -1073,7 +1073,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
// which the new curve should be inserted.
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
CGAL_assertion_msg
- (prev2 != NULL,
+ (prev2 != nullptr,
"The inserted curve cannot be located in the arrangement.");
CGAL_assertion_code
@@ -1081,7 +1081,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
prev2->outer_ccb()->face());
CGAL_assertion_msg
- ((f1 == NULL) || (f1 == f2),
+ ((f1 == nullptr) || (f1 == f2),
"The inserted curve should not intersect the existing arrangement.");
// Perform the insertion. Note that the returned halfedge is directed
@@ -1095,8 +1095,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
else if (v2->degree() == 0) {
// Get the face containing the isolated vertex v2.
DVertex* p_v2 = _vertex(v2);
- DIso_vertex* iv2 = NULL;
- DFace* f2 = NULL;
+ DIso_vertex* iv2 = nullptr;
+ DFace* f2 = nullptr;
if (v2->is_isolated()) {
// Obtain the containing face from the isolated vertex record.
@@ -1112,7 +1112,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
// which the new curve should be inserted.
DHalfedge* prev1 = _locate_around_vertex(_vertex(v1), cv, ind1);
CGAL_assertion_msg
- (prev1 != NULL,
+ (prev1 != nullptr,
"The inserted curve cannot be located in the arrangement.");
CGAL_assertion_code
@@ -1120,7 +1120,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
prev1->outer_ccb()->face());
CGAL_assertion_msg
- ((f2 == NULL) || (f2 == f1),
+ ((f2 == nullptr) || (f2 == f1),
"The inserted curve should not intersect the existing arrangement.");
// Perform the insertion.
@@ -1137,7 +1137,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
CGAL_assertion_msg
- (((prev1 != NULL) && (prev2 != NULL)),
+ (((prev1 != nullptr) && (prev2 != nullptr)),
"The inserted curve cannot be located in the arrangement.");
// Perform the insertion.
@@ -1259,8 +1259,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
if (v2->degree() == 0) {
// Get the face containing the isolated vertex v2.
DVertex* p_v2 = _vertex(v2);
- DIso_vertex* iv2 = NULL;
- DFace* f2 = NULL;
+ DIso_vertex* iv2 = nullptr;
+ DFace* f2 = nullptr;
if (v2->is_isolated()) {
iv2 = p_v2->isolated_vertex();
@@ -1287,7 +1287,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
// which the new curve should be inserted.
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
CGAL_assertion_msg
- (prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
+ (prev2 != nullptr, "The inserted curve cannot be located in the arrangement.");
// Perform the insertion.
return (insert_at_vertices(cv, prev1, Halfedge_handle(prev2)));
@@ -1652,10 +1652,10 @@ merge_edge(Halfedge_handle e1, Halfedge_handle e2,
//
DHalfedge* _e1 = _halfedge(e1);
DHalfedge* _e2 = _halfedge(e2);
- DHalfedge* he1 = NULL;
- DHalfedge* he2 = NULL;
- DHalfedge* he3 = NULL;
- DHalfedge* he4 = NULL;
+ DHalfedge* he1 = nullptr;
+ DHalfedge* he2 = nullptr;
+ DHalfedge* he3 = nullptr;
+ DHalfedge* he4 = nullptr;
if (_e1->vertex() == _e2->opposite()->vertex()) {
he1 = _e1;
@@ -1709,11 +1709,11 @@ merge_edge(Halfedge_handle e1, Halfedge_handle e2,
// Keep pointers to the components that contain two halfedges he3 and he2,
// pointing at the end vertices of the merged halfedge.
- DInner_ccb* ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : NULL;
- DOuter_ccb* oc1 = (ic1 == NULL) ? he3->outer_ccb() : NULL;
+ DInner_ccb* ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : nullptr;
+ DOuter_ccb* oc1 = (ic1 == nullptr) ? he3->outer_ccb() : nullptr;
- DInner_ccb* ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : NULL;
- DOuter_ccb* oc2 = (ic2 == NULL) ? he4->outer_ccb() : NULL;
+ DInner_ccb* ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : nullptr;
+ DOuter_ccb* oc2 = (ic2 == nullptr) ? he4->outer_ccb() : nullptr;
// Notify the observers that we are about to merge an edge.
_notify_before_merge_edge(e1, e2, cv);
@@ -1723,14 +1723,14 @@ merge_edge(Halfedge_handle e1, Halfedge_handle e2,
// the CCBs they belong to. If so, replace he3 by he1 and he4 by he2. Note
// that as we just change the component representatives, we do not have to
// notify the observers on the change.
- if (oc1 != NULL && oc1->halfedge() == he3)
+ if (oc1 != nullptr && oc1->halfedge() == he3)
oc1->set_halfedge(he1);
- else if (ic1 != NULL && ic1->halfedge() == he3)
+ else if (ic1 != nullptr && ic1->halfedge() == he3)
ic1->set_halfedge(he1);
- if (oc2 != NULL && oc2->halfedge() == he4)
+ if (oc2 != nullptr && oc2->halfedge() == he4)
oc2->set_halfedge(he2);
- else if (ic2 != NULL && ic2->halfedge() == he4)
+ else if (ic2 != nullptr && ic2->halfedge() == he4)
ic2->set_halfedge(he2);
// If he3 is the incident halfedge to its target, replace it by he1.
@@ -1832,7 +1832,7 @@ _locate_around_vertex(DVertex* v,
DHalfedge* first = v->halfedge();
DHalfedge* curr = first;
- if (curr == NULL) return NULL;
+ if (curr == nullptr) return nullptr;
DHalfedge* next = curr->next()->opposite();
@@ -1854,7 +1854,7 @@ _locate_around_vertex(DVertex* v,
{
// If cv equals one of the curves associated with the halfedges, it is
// an illegal input curve, as it already exists in the arrangement.
- if (eq_curr || eq_next) return NULL;
+ if (eq_curr || eq_next) return nullptr;
// Move to the next pair of incident halfedges.
curr = next;
@@ -1862,7 +1862,7 @@ _locate_around_vertex(DVertex* v,
// If we completed a full traversal around v without locating the
// place for cv, it follows that cv overlaps and existing curve.
- if (curr == first) return NULL;
+ if (curr == first) return nullptr;
}
// Return the halfedge we have located.
@@ -2173,7 +2173,7 @@ _create_boundary_vertex(const X_monotone_curve_2& cv, Arr_curve_end ind,
if (is_open(ps_x, ps_y))
// The curve-end lies on open boundary so the vertex is not associated
// with a valid point.
- v->set_point(NULL);
+ v->set_point(nullptr);
else {
// Create a boundary vertex associated with a valid point.
Point_2* p_p = (ind == ARR_MIN_END) ?
@@ -2244,7 +2244,7 @@ _place_and_set_curve_end(DFace* f,
m_topol_traits.notify_on_boundary_vertex_creation(v, cv, ind, ps_x, ps_y);
// There are no edges incident to v, therefore no predecessor halfedge.
- *p_pred = NULL;
+ *p_pred = nullptr;
}
// Return the vertex that represents the curve end.
@@ -2353,8 +2353,8 @@ _insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
// Get the incident face of the previous halfedge. Note that this will also
// be the incident face of the two new halfedges we are about to create.
- DInner_ccb* ic = (he_to->is_on_inner_ccb()) ? he_to->inner_ccb() : NULL;
- DOuter_ccb* oc = (ic == NULL) ? he_to->outer_ccb() : NULL;
+ DInner_ccb* ic = (he_to->is_on_inner_ccb()) ? he_to->inner_ccb() : nullptr;
+ DOuter_ccb* oc = (ic == nullptr) ? he_to->outer_ccb() : nullptr;
// The first vertex is the one that the he_to halfedge points to.
// The second vertex is given by v.
@@ -2376,7 +2376,7 @@ _insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
he2->set_vertex(v2);
// Set the component for the new halfedge pair.
- if (oc != NULL) {
+ if (oc != nullptr) {
// On an outer component:
he1->set_outer_ccb(oc);
he2->set_outer_ccb(oc);
@@ -2459,8 +2459,8 @@ _insert_at_vertices(DHalfedge* he_to,
he_away->outer_ccb()->face()) << std::endl;
#endif
- CGAL_precondition(he_to != NULL);
- CGAL_precondition(he_away != NULL);
+ CGAL_precondition(he_to != nullptr);
+ CGAL_precondition(he_away != nullptr);
// TODO EBEB 2012-10-21 rewrite the code in terms of he_to and he_away instead of prev1 and prev2
// the remainder of the function we deal with this situation adds he1 and
@@ -2471,8 +2471,8 @@ _insert_at_vertices(DHalfedge* he_to,
DHalfedge* prev1 = he_to;
DHalfedge* prev2 = he_away->prev();
- CGAL_precondition(prev1 != NULL);
- CGAL_precondition(prev2 != NULL);
+ CGAL_precondition(prev1 != nullptr);
+ CGAL_precondition(prev2 != nullptr);
CGAL_precondition(prev1 != prev2);
// in general we do not swap ...
@@ -2491,10 +2491,10 @@ _insert_at_vertices(DHalfedge* he_to,
// Comment EBEB 2012-08-05 hole1/hole2 appear later as ic1/ic2, but we keep
// them here, as the usage is rather local to decide swapping
- DInner_ccb* hole1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
- DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
+ DInner_ccb* hole1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : nullptr;
+ DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : nullptr;
- if ((hole1 == hole2) && (hole1 != NULL)) {
+ if ((hole1 == hole2) && (hole1 != nullptr)) {
// .. only in this special case, we have to check whether swapping should
// take place
@@ -2605,13 +2605,13 @@ _insert_at_vertices(DHalfedge* he_to,
// Get the components containing the two previous halfedges and the incident
// face (which should be the same for the two components).
- DInner_ccb* ic1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
- DOuter_ccb* oc1 = (ic1 == NULL) ? prev1->outer_ccb() : NULL;
- DFace* f = (ic1 != NULL) ? ic1->face() : oc1->face();
- DInner_ccb* ic2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
- DOuter_ccb* oc2 = (ic2 == NULL) ? prev2->outer_ccb() : NULL;
+ DInner_ccb* ic1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : nullptr;
+ DOuter_ccb* oc1 = (ic1 == nullptr) ? prev1->outer_ccb() : nullptr;
+ DFace* f = (ic1 != nullptr) ? ic1->face() : oc1->face();
+ DInner_ccb* ic2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : nullptr;
+ DOuter_ccb* oc2 = (ic2 == nullptr) ? prev2->outer_ccb() : nullptr;
- CGAL_precondition_code(DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face());
+ CGAL_precondition_code(DFace* f2 = (ic2 != nullptr) ? ic2->face() : oc2->face());
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
std::cout << "ic1: " << ic1 << std::endl;
@@ -2672,7 +2672,7 @@ _insert_at_vertices(DHalfedge* he_to,
bool split_new_face = true;
bool is_split_face_contained = false;
- if ((ic1 != NULL) && (ic1 == ic2)) {
+ if ((ic1 != nullptr) && (ic1 == ic2)) {
// EBEB 2012-08-06:
// This is new code. It relies on the (computed) signs and replaces to
@@ -2722,7 +2722,7 @@ _insert_at_vertices(DHalfedge* he_to,
// Check the various cases of insertion (in the design document: the
// various sub-cases of case 3 in the insertion procedure).
- if (((ic1 != NULL) || (ic2 != NULL)) && (ic1 != ic2)) {
+ if (((ic1 != nullptr) || (ic2 != nullptr)) && (ic1 != ic2)) {
// In case we have to connect two disconnected components, no new face
// is created.
new_face = false;
@@ -2732,7 +2732,7 @@ _insert_at_vertices(DHalfedge* he_to,
// of the face.
Face_handle fh(f);
- if ((ic1 != NULL) && (ic2 != NULL)) {
+ if ((ic1 != nullptr) && (ic2 != nullptr)) {
// In this case (3.1) we have to connect to inner CCBs (holes) inside f.
// Notify the observers that we are about to merge two holes in the face.
_notify_before_merge_inner_ccb(fh,
@@ -2769,7 +2769,7 @@ _insert_at_vertices(DHalfedge* he_to,
DHalfedge* ccb_first;
DHalfedge* ccb_last;
- if (ic1 != NULL) {
+ if (ic1 != nullptr) {
// We remove the inner CCB ic1 and merge in with the outer CCB oc2.
del_ic = ic1;
oc = oc2;
@@ -2809,7 +2809,7 @@ _insert_at_vertices(DHalfedge* he_to,
}
else if (! split_new_face) {
// RWRW: NEW!
- CGAL_assertion((ic1 == ic2) && (ic1 != NULL));
+ CGAL_assertion((ic1 == ic2) && (ic1 != nullptr));
// Handle the special case where we close an inner CCB, such that
// we form two outer CCBs of the same face.
@@ -2920,7 +2920,7 @@ _insert_at_vertices(DHalfedge* he_to,
// or on the same outer CCB (distinguish case 3.3 and case 3.4).
bool is_hole;
- if (ic1 != NULL) {
+ if (ic1 != nullptr) {
// In this case (3.3) we have two distinguish two sub-cases.
if (is_split_face_contained) {
// Comment: This is true for all non-identification topologies
@@ -3079,7 +3079,7 @@ _insert_at_vertices(DHalfedge* he_to,
_notify_after_split_face(fh, Face_handle(new_f), is_hole);
}
else {
- CGAL_assertion((oc1 != NULL) && (oc2 != NULL) && (oc1 != oc2));
+ CGAL_assertion((oc1 != nullptr) && (oc2 != nullptr) && (oc1 != oc2));
// In case prev1 and prev2 belong to different outer CCBs of the same
// face f (case 3.5), we have to merge this ccbs into one. Note that we
@@ -3122,12 +3122,12 @@ _insert_at_vertices(DHalfedge* he_to,
#if 0
{
DHalfedge* he1 = he2->opposite();
- DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
- DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
- DFace* f1 = (ic1 != NULL) ? ic1->face() : oc1->face();
- DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
- DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
- DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face();
+ DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
+ DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
+ DFace* f1 = (ic1 != nullptr) ? ic1->face() : oc1->face();
+ DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
+ DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
+ DFace* f2 = (ic2 != nullptr) ? ic2->face() : oc2->face();
CGAL_postcondition((ic1 != ic2) || (f1 == f2));
}
#endif
@@ -3337,10 +3337,10 @@ _split_edge(DHalfedge* e, DVertex* v,
// Get the split halfedge and its twin, its source and target.
DHalfedge* he1 = e;
DHalfedge* he2 = he1->opposite();
- DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
- DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
- DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
- DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
+ DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
+ DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
+ DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
+ DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
// Notify the observers that we are about to split an edge.
_notify_before_split_edge(Halfedge_handle(e), Vertex_handle(v), cv1, cv2);
@@ -3370,7 +3370,7 @@ _split_edge(DHalfedge* e, DVertex* v,
// he1 and he2 form an "antenna", so he4 becomes he3's successor.
he3->set_next(he4);
- if (oc1 != NULL)
+ if (oc1 != nullptr)
he3->set_outer_ccb(oc1);
else
he3->set_inner_ccb(ic1);
@@ -3379,7 +3379,7 @@ _split_edge(DHalfedge* e, DVertex* v,
he4->set_vertex(v);
he4->set_next(he2);
- if (oc2 != NULL)
+ if (oc2 != nullptr)
he4->set_outer_ccb(oc2);
else
he4->set_inner_ccb(ic2);
@@ -3472,8 +3472,8 @@ _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
// Precondition The OutputIterator must be a back inserter.
// Precondition The traveresed ccb is an inner ccb; thus, it cannot be
// on an open boundary.
-// Postcondition If NULL is a local minimum, it is inserted first.
-// No other local minima can be NULL.
+// Postcondition If nullptr is a local minimum, it is inserted first.
+// No other local minima can be nullptr.
template
template
std::pair
@@ -3553,7 +3553,7 @@ _compute_signs_and_local_minima(const DHalfedge* he_to,
if ((cv_dir == ARR_RIGHT_TO_LEFT) &&
(he_away->direction() == ARR_LEFT_TO_RIGHT)) {
- const DHalfedge* null_he = NULL;
+ const DHalfedge* null_he = nullptr;
*local_mins_it++ = std::make_pair(null_he, x_index);
}
@@ -3712,7 +3712,7 @@ _compute_signs_and_min(const DHalfedge* he_anchor,
int& index_min) const
{
// Initialize
- const DHalfedge* he_min = NULL;
+ const DHalfedge* he_min = nullptr;
ps_x_min = ARR_INTERIOR;
ps_y_min = ARR_INTERIOR;
index_min = 0;
@@ -3795,7 +3795,7 @@ _compute_signs_and_min(const DHalfedge* he_anchor,
// Test the halfedge incident to the leftmost vertex.
// Note that we may visit the same vertex several times.
- if ((he_min == NULL) ||
+ if ((he_min == nullptr) ||
(index_curr < index_min) ||
((index_curr == index_min) &&
((he_curr->vertex() != he_min->vertex()) &&
@@ -4023,9 +4023,9 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
int index_min = lm_it->second;
const DHalfedge* he_min = lm_it->first;
const DVertex* v_min =
- (he_min == NULL) ? he_away->opposite()->vertex() : he_min->vertex();
+ (he_min == nullptr) ? he_away->opposite()->vertex() : he_min->vertex();
const X_monotone_curve_2* cv_min =
- (he_min == NULL) ? &cv : &(he_min->curve());
+ (he_min == nullptr) ? &cv : &(he_min->curve());
Arr_parameter_space ps_x_min = parameter_space_in_x(*cv_min, ARR_MIN_END);
Arr_parameter_space ps_y_min = parameter_space_in_y(*cv_min, ARR_MIN_END);
@@ -4077,7 +4077,7 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
}
}
- CGAL_assertion(v_min != NULL);
+ CGAL_assertion(v_min != nullptr);
CGAL_assertion(!v_min->has_null_point());
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
@@ -4086,7 +4086,7 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
if (he_min)
std::cout << he_min->opposite()->vertex()->point()
<< " => " << he_min->vertex()->point();
- else std::cout << "NULL";
+ else std::cout << "nullptr";
std::cout << std::endl;
#endif
@@ -4096,7 +4096,7 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
// to the right of the leftmost vertex. We compare them to the right of this
// point to determine whether he_to (the curve) and he_away are incident to
// the hole to be created or not.
- const X_monotone_curve_2& cv_next = (he_min == NULL) ?
+ const X_monotone_curve_2& cv_next = (he_min == nullptr) ?
he_away->curve() : ((he_min == he_to) ? cv : he_min->next()->curve());
return _is_above(*cv_min, cv_next, v_min->point(), ps_y_min,
Top_or_bottom_sides_category());
@@ -4202,12 +4202,12 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
// belong to and their incident faces.
DHalfedge* he1 = e;
DHalfedge* he2 = e->opposite();
- DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
- DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
- DFace* f1 = (oc1 != NULL) ? oc1->face() : ic1->face();
- DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
- DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
- DFace* f2 = (oc2 != NULL) ? oc2->face() : ic2->face();
+ DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
+ DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
+ DFace* f1 = (oc1 != nullptr) ? oc1->face() : ic1->face();
+ DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
+ DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
+ DFace* f2 = (oc2 != nullptr) ? oc2->face() : ic2->face();
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
#if 0
@@ -4419,8 +4419,8 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
#endif
// Now the real removal starts.
- DHalfedge* prev1 = NULL;
- DHalfedge* prev2 = NULL;
+ DHalfedge* prev1 = nullptr;
+ DHalfedge* prev2 = nullptr;
// Notify the observers that we are about to remove an edge.
Halfedge_handle hh(e);
@@ -4432,7 +4432,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
if (f1 == f2) {
// Check whether the two halfedges are successors along the face boundary.
if ((he1->next() == he2) && (he2->next() == he1)) {
- CGAL_assertion((ic1 != NULL) && (ic1 == ic2));
+ CGAL_assertion((ic1 != nullptr) && (ic1 == ic2));
// The two halfedges form a "singleton" hole inside the incident face
// (case 1 of the removal procedure, as detailed in the design document),
@@ -4463,7 +4463,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
if ((v1->parameter_space_in_x() != ARR_INTERIOR) ||
(v1->parameter_space_in_y() != ARR_INTERIOR))
{
- v1->set_halfedge(NULL); // disconnect the end vertex
+ v1->set_halfedge(nullptr); // disconnect the end vertex
_remove_vertex_if_redundant(v1, f1);
}
else {
@@ -4485,7 +4485,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
if ((v2->parameter_space_in_x() != ARR_INTERIOR) ||
(v2->parameter_space_in_y() != ARR_INTERIOR))
{
- v2->set_halfedge(NULL); // disconnect the end vertex
+ v2->set_halfedge(nullptr); // disconnect the end vertex
_remove_vertex_if_redundant(v2, f1);
}
else {
@@ -4533,10 +4533,10 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
// In case the halfedges to be deleted are represantatives of their
// CCB (note that noth should belong to the same CCB, be it an outer
// CCB or an inner one), make prev1 the components representative.
- if ((oc1 != NULL) &&
+ if ((oc1 != nullptr) &&
((oc1->halfedge() == he1) || (oc1->halfedge() == he2)))
oc1->set_halfedge(prev1);
- else if ((ic1 != NULL) &&
+ else if ((ic1 != nullptr) &&
((ic1->halfedge() == he1) || (ic1->halfedge() == he2)))
ic1->set_halfedge(prev1);
@@ -4565,7 +4565,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
if ((v1->parameter_space_in_x() != ARR_INTERIOR) ||
(v1->parameter_space_in_y() != ARR_INTERIOR))
{
- v1->set_halfedge(NULL); // disconnect the end vertex
+ v1->set_halfedge(nullptr); // disconnect the end vertex
_remove_vertex_if_redundant(v1, f1);
}
else {
@@ -4598,7 +4598,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
prev1 = he1->prev();
prev2 = he2->prev();
- if ((ic1 != NULL) && (ic1 == ic2)) {
+ if ((ic1 != nullptr) && (ic1 == ic2)) {
// If both halfedges lie on the same inner component (hole) inside the
// face (case 3.1), we have to split this component into two holes.
@@ -4639,7 +4639,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
}
else if (oc1 != oc2) {
// RWRW: NEW!
- CGAL_assertion((oc1 != NULL) && (oc2 != NULL));
+ CGAL_assertion((oc1 != nullptr) && (oc2 != nullptr));
// In case both halfegdes he1 and he2 are incident to the same face
// but lie on different outer CCBs of this face, removing this pair of
@@ -4665,7 +4665,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
add_inner_ccb = true;
}
else {
- CGAL_assertion((oc1 != NULL) && (oc1 == oc2));
+ CGAL_assertion((oc1 != nullptr) && (oc1 == oc2));
// If both halfedges are incident to the same outer CCB of their
// face (case 3.2), we have to distinguish two sub-cases:
@@ -4851,9 +4851,9 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
prev1 = he1->prev();
prev2 = he2->prev();
- CGAL_assertion((ic1 == NULL) || (ic2 == NULL));
+ CGAL_assertion((ic1 == nullptr) || (ic2 == nullptr));
- if ((ic1 == NULL) && (ic2 == NULL)) {
+ if ((ic1 == nullptr) && (ic2 == nullptr)) {
bool add_inner_ccb = false;
// Comment EFEF 2013-05-31: if we ever find the need to use signs1 and
@@ -5017,15 +5017,15 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
// inside it (case 3.3). We first make sure that f1 contains the hole f2, so
// we can merge f2 with it (we swap roles between the halfedges if
// necessary).
- if (ic2 != NULL) {
+ if (ic2 != nullptr) {
he1 = he2;
he2 = he1->opposite();
ic1 = ic2;
- ic2 = NULL;
+ ic2 = nullptr;
oc2 = oc1;
- oc1 = NULL;
+ oc1 = nullptr;
DFace* tf = f1;
f1 = f2;
@@ -5139,7 +5139,7 @@ _remove_vertex_if_redundant(DVertex* v, DFace* f)
// In case the vertex has no incident halfedges, remove it if it is
// redundant. Otherwise, make it an isolated vertex.
- if (v->halfedge() == NULL) {
+ if (v->halfedge() == nullptr) {
if (m_topol_traits.is_redundant(v)) {
// Remove the vertex and notify the observers on doing so.
_notify_before_remove_vertex(Vertex_handle(v));
diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h
index 254a16364c0..483c8905ac0 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h
@@ -106,7 +106,7 @@ void Arrangement_zone_2::compute_zone()
const Halfedge_const_handle* hh;
const Face_const_handle* fh;
- if ((vh = object_cast(&m_obj)) != NULL) {
+ if ((vh = object_cast(&m_obj)) != nullptr) {
CGAL_assertion(m_has_left_pt);
// The left endpoint coincides with an existing vertex:
@@ -128,7 +128,7 @@ void Arrangement_zone_2::compute_zone()
#endif
}
- else if ((hh = object_cast(&m_obj)) != NULL) {
+ else if ((hh = object_cast(&m_obj)) != nullptr) {
if (m_has_left_pt) {
// Obtain the right halfedge from the halfedge-pair containing m_left_pt
// in their interior.
@@ -171,7 +171,7 @@ void Arrangement_zone_2::compute_zone()
// The left endpoint lies inside a face.
fh = object_cast(&m_obj);
- CGAL_assertion_msg(fh != NULL,
+ CGAL_assertion_msg(fh != nullptr,
"Invalid object returned by the point-location query.");
// Compute the zone of the curve at the interior of the face.
@@ -843,7 +843,7 @@ _compute_next_intersection(Halfedge_handle he,
// valid, as they lie to its right.
valid_intersection = true;
}
- else if (ip != NULL) {
+ else if (ip != nullptr) {
if (m_has_right_pt && m_right_on_boundary &&
m_geom_traits->equal_2_object()(ip->first, m_right_pt))
{
@@ -861,7 +861,7 @@ _compute_next_intersection(Halfedge_handle he,
else {
// We have an overlapping subcurve.
icv = object_cast(&(inter_list.front()));
- CGAL_assertion(icv != NULL);
+ CGAL_assertion(icv != nullptr);
if (m_geom_traits->is_closed_2_object()(*icv, ARR_MIN_END)) {
// The curve has a valid left point - make sure it lies to the
@@ -905,7 +905,7 @@ _compute_next_intersection(Halfedge_handle he,
// Compare that current object with m_left_pt (if exists).
ip = object_cast(&(inter_list.front()));
- if (ip != NULL) {
+ if (ip != nullptr) {
// We have a simple intersection point - if we don't have to skip it,
// make sure it lies to the right of m_left_pt (if m_left_pt is on the
// left boundary, all points lie to it right).
@@ -930,7 +930,7 @@ _compute_next_intersection(Halfedge_handle he,
else {
// We have an overlapping subcurve.
icv = object_cast(&(inter_list.front()));
- CGAL_assertion(icv != NULL);
+ CGAL_assertion(icv != nullptr);
if (m_geom_traits->is_closed_2_object()(*icv, ARR_MIN_END)) {
// The curve has a valid left point - make sure it lies to the
@@ -1122,7 +1122,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary,
// We have found an intersection (either a simple point or an
// overlapping x-monotone curve).
const Intersect_point_2* int_p = object_cast(&iobj);
- if (int_p != NULL) {
+ if (int_p != nullptr) {
Point_2 ip = int_p->first;
// Found a simple intersection point. Check if it is the leftmost
@@ -1144,7 +1144,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary,
// We have located an overlapping curve. Assign ip as its left
// endpoint.
const X_monotone_curve_2* icv = object_cast(&iobj);
- CGAL_assertion(icv != NULL);
+ CGAL_assertion(icv != nullptr);
Point_2 ip = min_vertex(*icv);
// Check if this endpoint it is the leftmost intersection point so far.
@@ -1301,7 +1301,7 @@ _zone_in_face(Face_handle face, bool on_boundary)
m_cv = m_sub_cv2;
}
- const X_monotone_curve_2*p_orig_curve = NULL;
+ const X_monotone_curve_2*p_orig_curve = nullptr;
if (! m_found_iso_vert) {
// Check whether m_intersect_p coincides with one of the end-vertices of the
@@ -1364,8 +1364,8 @@ _zone_in_face(Face_handle face, bool on_boundary)
// subcurves that result from splitting m_intersect_he->curve() at the
// intersection point we have just detected, one extends to the left
// and one to the right of this split point.
- const X_monotone_curve_2* p_left_subcurve = NULL;
- const X_monotone_curve_2* p_right_subcurve = NULL;
+ const X_monotone_curve_2* p_left_subcurve = nullptr;
+ const X_monotone_curve_2* p_right_subcurve = nullptr;
if (inserted_he->next()->direction() == ARR_LEFT_TO_RIGHT) {
// The next halfedge extends to the right of the split point:
diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h
index 6be8db37bfe..f3c26b4e865 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h
@@ -247,7 +247,7 @@ public:
typedef Face_neighbor_iterator Incident_edge_iterator;
/*! Default constructor. */
- Dual_arrangement_on_surface() : p_arr(NULL) {}
+ Dual_arrangement_on_surface() : p_arr(nullptr) {}
/*! Constructor from an arrangement. */
Dual_arrangement_on_surface(const Arrangement& arr) :
diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h
index 7d51cc94b18..649b96b51a5 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h
@@ -165,7 +165,7 @@ protected:
const Topology_traits* m_topol_traits;
public:
- _Is_concrete_vertex() : m_topol_traits(NULL) {}
+ _Is_concrete_vertex() : m_topol_traits(nullptr) {}
_Is_concrete_vertex(const Topology_traits* topol_traits) :
m_topol_traits(topol_traits)
@@ -173,7 +173,7 @@ protected:
bool operator()(const DVertex& v) const
{
- if (m_topol_traits == NULL)
+ if (m_topol_traits == nullptr)
return true;
return (m_topol_traits->is_concrete_vertex(&v));
@@ -188,7 +188,7 @@ protected:
const Topology_traits* m_topol_traits;
public:
- _Is_valid_vertex() : m_topol_traits(NULL) {}
+ _Is_valid_vertex() : m_topol_traits(nullptr) {}
_Is_valid_vertex(const Topology_traits* topol_traits) :
m_topol_traits(topol_traits)
@@ -196,7 +196,7 @@ protected:
bool operator()(const DVertex& v) const
{
- if (m_topol_traits == NULL)
+ if (m_topol_traits == nullptr)
return true;
return (m_topol_traits->is_valid_vertex(&v));
@@ -211,7 +211,7 @@ protected:
const Topology_traits* m_topol_traits;
public:
- _Is_valid_halfedge() : m_topol_traits(NULL) {}
+ _Is_valid_halfedge() : m_topol_traits(nullptr) {}
_Is_valid_halfedge(const Topology_traits* topol_traits) :
m_topol_traits(topol_traits)
@@ -219,7 +219,7 @@ protected:
bool operator()(const DHalfedge& he) const
{
- if (m_topol_traits == NULL)
+ if (m_topol_traits == nullptr)
return true;
return (m_topol_traits->is_valid_halfedge(&he));
@@ -234,7 +234,7 @@ protected:
const Topology_traits* m_topol_traits;
public:
- _Is_valid_face() : m_topol_traits(NULL) {}
+ _Is_valid_face() : m_topol_traits(nullptr) {}
_Is_valid_face(const Topology_traits* topol_traits) :
m_topol_traits(topol_traits)
@@ -242,7 +242,7 @@ protected:
bool operator()(const DFace& f) const
{
- if (m_topol_traits == NULL)
+ if (m_topol_traits == nullptr)
return true;
return (m_topol_traits->is_valid_face(&f));
@@ -257,7 +257,7 @@ protected:
const Topology_traits* m_topol_traits;
public:
- _Is_unbounded_face() : m_topol_traits(NULL) {}
+ _Is_unbounded_face() : m_topol_traits(nullptr) {}
_Is_unbounded_face(const Topology_traits* topol_traits) :
m_topol_traits(topol_traits)
@@ -587,7 +587,7 @@ public:
const DHalfedge* he_curr = he_first;
Size n = 0;
- if (he_curr != NULL) {
+ if (he_curr != nullptr) {
do {
++n;
he_curr = he_curr->next()->opposite();
@@ -1777,7 +1777,7 @@ protected:
* \return A pointer to a halfedge whose target is v, where cv should be
* inserted between this halfedge and the next halfedge around this
* vertex (in a clockwise order).
- * A NULL return value indicates a precondition violation.
+ * A nullptr return value indicates a precondition violation.
*/
DHalfedge* _locate_around_vertex(DVertex* v, const X_monotone_curve_2& cv,
Arr_curve_end ind) const;
@@ -2031,7 +2031,7 @@ protected:
* \param bx The boundary condition at the x-coordinate.
* \param by The boundary condition at the y-coordinate.
* \param p_pred Output: The predecessor halfedge around this vertex
- * (may be NULL, if no such halfedge exists).
+ * (may be nullptr, if no such halfedge exists).
* \return The vertex that corresponds to the curve end.
*/
DVertex* _place_and_set_curve_end(DFace* f,
diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h
index 4dfb2d7964b..99f2892b396 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h
@@ -186,7 +186,7 @@ public:
m_invalid_he()
{
m_geom_traits = static_cast(arr.geometry_traits());
- CGAL_assertion(visitor != NULL);
+ CGAL_assertion(visitor != nullptr);
// Initialize the visitor.
visitor->init(&arr);
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
index 52a0d51a6eb..bf6cf638809 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
@@ -960,9 +960,9 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
compare_x_at_limit_2)
- // compare with NULL, in order to avoid a performance warning with VC++
+ // compare with nullptr, in order to avoid a performance warning with VC++
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_x_at_limit_2(
p, *dynamic_cast< const Kernel_arc_2* >(this), ce
);
@@ -990,7 +990,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
compare_x_at_limit_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_x_at_limit_2(
*dynamic_cast< const Kernel_arc_2* >(this), ce1, cv2, ce2
);
@@ -1017,7 +1017,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
compare_x_near_limit_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_x_near_limit_2(
p, *dynamic_cast< const Kernel_arc_2* >(this), ce
);
@@ -1043,7 +1043,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
compare_x_near_limit_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_x_near_limit_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce);
}
@@ -1068,7 +1068,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_near_boundary_2,
compare_y_near_boundary_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_y_near_boundary_2(
*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce
);
@@ -1090,7 +1090,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_2,
compare_y_at_x_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_y_at_x_2(p, *dynamic_cast< const Kernel_arc_2* >(this));
}
@@ -1116,7 +1116,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_left_2,
compare_y_at_x_left_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_y_at_x_left_2(
*dynamic_cast< const Kernel_arc_2* >(this), cv2, p
);
@@ -1144,7 +1144,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_right_2,
compare_y_at_x_right_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return compare_y_at_x_right_2(
*dynamic_cast< const Kernel_arc_2* >(this), cv2, p
);
@@ -1161,18 +1161,18 @@ public:
* \return \c true, if p.x() is in x-range of arc, \c false otherwise
*/
bool is_in_x_range(const Coordinate_1& x,
- bool *eq_min = NULL, bool *eq_max = NULL) const {
+ bool *eq_min = nullptr, bool *eq_max = nullptr) const {
- if (eq_min != NULL && eq_max != NULL) {
+ if (eq_min != nullptr && eq_max != nullptr) {
*eq_min = *eq_max = false;
}
if (is_vertical()) {
if (x == this->x()) {
- if (eq_min != NULL) {
+ if (eq_min != nullptr) {
*eq_min = true;
}
- if (eq_max != NULL) {
+ if (eq_max != nullptr) {
*eq_max = true;
}
return true;
@@ -1191,7 +1191,7 @@ public:
if (min_has_x) {
resmin = Curved_kernel_via_analysis_2::instance().
kernel().compare_1_object()(x, _minpoint().x());
- if (eq_min != NULL) { // TODO asymptotic end in x-range?
+ if (eq_min != nullptr) { // TODO asymptotic end in x-range?
*eq_min = (resmin == CGAL::EQUAL);
}
}
@@ -1206,7 +1206,7 @@ public:
if (max_has_x) {
resmax = Curved_kernel_via_analysis_2::instance().
kernel().compare_1_object()(x, _maxpoint().x());
- if (eq_max != NULL) { // TODO asymptotic end in x-range?
+ if (eq_max != nullptr) { // TODO asymptotic end in x-range?
*eq_max = (resmax == CGAL::EQUAL);
}
}
@@ -1246,7 +1246,7 @@ public:
equal_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return equal_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
}
@@ -1262,7 +1262,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Do_overlap_2,
do_overlap_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return do_overlap_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
}
@@ -1345,7 +1345,7 @@ public:
intersect_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return intersect_2(
*dynamic_cast< const Kernel_arc_2* >(this), cv2, oi
);
@@ -1449,7 +1449,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Trim_2, trim_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return trim_2(*dynamic_cast< const Kernel_arc_2* >(this), p, q);
}
@@ -1467,7 +1467,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Split_2,
split_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
split_2(*dynamic_cast< const Kernel_arc_2* >(this), p, s1, s2);
}
@@ -1483,7 +1483,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Are_mergeable_2,
are_mergeable_2)
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
return are_mergeable_2(
*dynamic_cast< const Kernel_arc_2* >(this), cv2
);
@@ -1503,7 +1503,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Merge_2, merge_2)
Kernel_arc_2 tmp;
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
merge_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, tmp);
return tmp;
}
@@ -1653,7 +1653,7 @@ public:
Kernel_arc_2& trimmed2) const {
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2* >(this) != NULL);
+ dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
const Kernel_arc_2& cv1 = static_cast< const Kernel_arc_2& >(*this);
@@ -1956,7 +1956,7 @@ protected:
CGAL_precondition(!is_on_bottom_top(where));
CGAL_assertion(Kernel_arc_2_equals_Arc_2 ||
- dynamic_cast< const Kernel_arc_2*>(this) != NULL);
+ dynamic_cast< const Kernel_arc_2*>(this) != nullptr);
Kernel_arc_2::simplify(*dynamic_cast< const Kernel_arc_2*>(this), cv2);
if(curve().is_identical(cv2.curve()))
return CGAL::sign(arcno() - cv2.arcno());
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h
index a48e518c08c..5336bfb358a 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h
@@ -262,8 +262,8 @@ public:
class Allocator >
inline void draw(const Arc_2& arc,
Container< std::vector< Coord_2 >, Allocator >& pts,
- boost::optional< Coord_2 > *end_pt1 = NULL,
- boost::optional< Coord_2 > *end_pt2 = NULL) {
+ boost::optional< Coord_2 > *end_pt1 = nullptr,
+ boost::optional< Coord_2 > *end_pt2 = nullptr) {
#ifndef CGAL_CKVA_DUMMY_RENDERER
Bbox_2 bbox;
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
index 9520105d9be..dbbfdada53d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
@@ -93,7 +93,7 @@ public:
Curved_kernel_via_analysis_2_functor_base(
Curved_kernel_via_analysis_2 *kernel) :
_m_curved_kernel(kernel) {
- CGAL_precondition(kernel != NULL);
+ CGAL_precondition(kernel != nullptr);
}
//!@}
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
index 1e2b630628d..73e3654d2c1 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
@@ -108,7 +108,7 @@ struct Make_x_monotone_2 :
*/
Make_x_monotone_2(Curved_kernel_via_analysis_2 *kernel) :
_m_curved_kernel(kernel) {
- CGAL_assertion(kernel != NULL);
+ CGAL_assertion(kernel != nullptr);
}
//!@}
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
index d00859f803f..20e37bd5af3 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
@@ -504,7 +504,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_x_2, compare_x_2)
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
- dynamic_cast< const Kernel_point_2* >(this) != NULL);
+ dynamic_cast< const Kernel_point_2* >(this) != nullptr);
return compare_x_2(*dynamic_cast< const Kernel_point_2* >(this), q);
}
@@ -527,7 +527,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_xy_2, compare_xy_2)
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
- dynamic_cast< const Kernel_point_2* >(this) != NULL);
+ dynamic_cast< const Kernel_point_2* >(this) != nullptr);
return compare_xy_2(
*dynamic_cast< const Kernel_point_2* >(this), q, equal_x
);
@@ -547,7 +547,7 @@ public:
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Is_on_2, is_on_2)
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
- dynamic_cast< const Kernel_point_2* >(this) != NULL);
+ dynamic_cast< const Kernel_point_2* >(this) != nullptr);
return is_on_2(*dynamic_cast< const Kernel_point_2* >(this), curve);
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
index 57cc08578ce..6538627d3e7 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
@@ -66,7 +66,7 @@ public:
//! standard constructor
Compare_xy_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
result_type operator()(const Point_2& p1, const Point_2& p2) const {
@@ -170,7 +170,7 @@ public:
//! standard constructor
Less_xy_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
/*!
@@ -196,7 +196,7 @@ public:
//! standard constructor
Compare_y_at_x_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
result_type operator()(const Arc_2& cv, const Point_2& p) const {
@@ -322,7 +322,7 @@ public:
//! standard constructor
Equal_y_at_x_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
/*!
@@ -425,7 +425,7 @@ public:
//! standard constructor
Source_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
/*!
@@ -452,7 +452,7 @@ public:
//! standard constructor
Target_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
/*!
@@ -548,7 +548,7 @@ public:
//! standard constructor
New_endpoints_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
/*!\brief
@@ -646,7 +646,7 @@ public:
//! standard constructor
Intersect_right_of_point_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
/*!\brief
@@ -699,7 +699,7 @@ public:
//! standard constructor
Make_x_monotone_2(SweepCurvesAdapter_2 *adapter) :
_m_adapter(adapter) {
- CGAL_assertion(adapter != NULL);
+ CGAL_assertion(adapter != nullptr);
}
/*!
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h
index 1a1172b9ce6..e425f5f71b0 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h
@@ -288,7 +288,7 @@ public:
//! \brief returns the drawing window and resolution
void get_setup_parameters(CGAL::Bbox_2 *pbox, int& res_w_,
int& res_h_) const {
- if(pbox != NULL)
+ if(pbox != nullptr)
*pbox = engine.window;
res_w_ = engine.res_w;
res_h_ = engine.res_h;
@@ -332,7 +332,7 @@ private:
//! computes pixel coordinates from rational point
void get_pixel_coords(const Rational& x, const Rational& y,
- Pixel_2& pix, Rational *ppix_x=NULL, Rational *ppix_y=NULL)
+ Pixel_2& pix, Rational *ppix_x=nullptr, Rational *ppix_y=nullptr)
{
Rational p_x = (x - engine.x_min_r) / engine.pixel_w_r,
p_y = (y - engine.y_min_r) / engine.pixel_h_r;
@@ -344,7 +344,7 @@ private:
pix.x = static_cast(std::floor(CGAL::to_double(p_x)));
pix.y = static_cast(std::floor(CGAL::to_double(p_y)));
- if(ppix_x != NULL && ppix_y != NULL) {
+ if(ppix_x != nullptr && ppix_y != nullptr) {
*ppix_x = p_x;
*ppix_y = p_y;
}
@@ -428,8 +428,8 @@ template < class Coord_2, template < class, class > class Container,
class Allocator >
void draw(const Arc_2& arc,
Container< std::vector< Coord_2 >, Allocator >& points,
- boost::optional< Coord_2 > *end_pt1 = NULL,
- boost::optional< Coord_2 > *end_pt2 = NULL) {
+ boost::optional< Coord_2 > *end_pt1 = nullptr,
+ boost::optional< Coord_2 > *end_pt2 = nullptr) {
#ifdef CGAL_CKVA_CR_TIMING
refine_timer.start();
@@ -616,7 +616,7 @@ void draw(const Arc_2& arc,
#endif
#ifdef CGAL_CKVA_RENDER_WITH_REFINEMENT
- if(end_pt1 != NULL && loc_p1 == CGAL::ARR_INTERIOR &&
+ if(end_pt1 != nullptr && loc_p1 == CGAL::ARR_INTERIOR &&
(clip_src || y_lower < engine.y_min_r || y_lower > engine.y_max_r)) {
y_lower0 = (clip_src ?
get_endpoint_y(arc, lower0, CGAL::ARR_MIN_END, false,
@@ -626,7 +626,7 @@ void draw(const Arc_2& arc,
*end_pt1 = Coord_2(CGAL::to_double(lower0),
CGAL::to_double(y_lower0));
}
- if(end_pt2 != NULL && loc_p2 == CGAL::ARR_INTERIOR &&
+ if(end_pt2 != nullptr && loc_p2 == CGAL::ARR_INTERIOR &&
(clip_tgt || y_upper < engine.y_min_r || y_upper > engine.y_max_r)) {
y_upper0 = (clip_tgt ?
get_endpoint_y(arc, upper0, CGAL::ARR_MAX_END, false,
@@ -650,9 +650,9 @@ void draw(const Arc_2& arc,
get_pixel_coords(upper, y_upper, pix_2);
#ifndef CGAL_CKVA_RENDER_WITH_REFINEMENT
- if(end_pt1 != NULL)
+ if(end_pt1 != nullptr)
*end_pt1 = Coord_2(pix_1.x, pix_1.y);
- if(end_pt2 != NULL)
+ if(end_pt2 != nullptr)
*end_pt2 = Coord_2(pix_2.x, pix_2.y);
#endif
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
index d2ac06551ed..034bb2a93ca 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h
@@ -321,11 +321,11 @@ public:
//! \brief evalutates a polynomial at certain x-coordinate
static NT evaluate(const Poly_1& poly, const NT& x,
- bool *error_bounds_ = NULL)
+ bool *error_bounds_ = nullptr)
{
typename Renderer_traits::Extract_eval extract;
int n = poly.degree()+1, m = (n-1)>>1, odd = n&1;
- if(error_bounds_ != NULL)
+ if(error_bounds_ != nullptr)
*error_bounds_ = false;
if(n == 1)
return extract(poly.lcoeff(), error_bounds_);
@@ -479,7 +479,7 @@ bool setup(const CGAL::Bbox_2& box_, int res_w_, int res_h_)
pixel_w = (x_max - x_min) / res_w;
pixel_h = (y_max - y_min) / res_h;
- //srand(time(NULL));
+ //srand(time(nullptr));
// from 0.1 to 0.5
double rmin = 0.1, rmax = 0.5;
NT sx = pixel_w * static_cast(rmin +
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
index 74f77e57d7d..6718122f035 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h
@@ -223,8 +223,8 @@ struct Curve_renderer_traits_base
typedef Coeff result_type;
Coeff operator()(const Coeff& x,
- bool *error_bounds = NULL) const {
- if(error_bounds != NULL)
+ bool *error_bounds = nullptr) const {
+ if(error_bounds != nullptr)
*error_bounds = false;
return x;
}
@@ -309,13 +309,13 @@ struct Curve_renderer_traits, CORE::BigRat > :
typedef Float result_type;
Float operator()(const Coeff& x,
- bool *error_bounds = NULL) const {
+ bool *error_bounds = nullptr) const {
bool err_bnd;
// err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
// ((l <= 0 && u >= 0));
Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
- if(error_bounds != NULL)
+ if(error_bounds != nullptr)
*error_bounds = err_bnd;
//! ATTENTION!!! if smth is screwed up try to uncomment the line below
//! this is very crucial for performance & stability
@@ -456,13 +456,13 @@ struct Curve_renderer_traits, leda::rational > :
typedef Float result_type;
Float operator()(const Coeff& x,
- bool *error_bounds = NULL) const {
+ bool *error_bounds = nullptr) const {
bool err_bnd;
// err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
// ((l <= 0 && u >= 0));
Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
- if(error_bounds != NULL)
+ if(error_bounds != nullptr)
*error_bounds = err_bnd;
//! ATTENTION!!! if smth is screwed up try to uncomment the line below
//! this is very crucial for performance & stability
diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h
index 6f743a2ba77..5ebac8a1222 100644
--- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h
@@ -243,7 +243,7 @@ private:
template
void Subdivision_2::draw(QPainter *painter_)
{
- if(!initialized||!polynomial_set||painter_==NULL)
+ if(!initialized||!polynomial_set||painter_==nullptr)
return;
painter = painter_;
//std::cout << " P(x(y)): " << coeffs_x << std::endl;
diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
index e12efb4987a..51be06dd29e 100644
--- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
+++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
@@ -76,19 +76,19 @@ public:
/*! Default constructor.*/
Arr_text_formatter():
- m_out(NULL),
- m_in(NULL)
+ m_out(nullptr),
+ m_in(nullptr)
{}
/*! Construct an output formatter. */
Arr_text_formatter(std::ostream& os) :
m_out(&os),
- m_in(NULL)
+ m_in(nullptr)
{}
/*! Construct an input formatter. */
Arr_text_formatter(std::istream& is) :
- m_out(NULL),
+ m_out(nullptr),
m_in(&is)
{}
@@ -111,14 +111,14 @@ public:
/*! Get the output stream. */
inline std::ostream& out()
{
- CGAL_assertion(m_out != NULL);
+ CGAL_assertion(m_out != nullptr);
return (*m_out);
}
/*! Get the input stream. */
inline std::istream& in()
{
- CGAL_assertion(m_in != NULL);
+ CGAL_assertion(m_in != nullptr);
return (*m_in);
}
@@ -128,7 +128,7 @@ public:
/*! Write a begin-arrangement comment. */
void write_arrangement_begin()
{
- CGAL_assertion(m_out != NULL);
+ CGAL_assertion(m_out != nullptr);
m_old_out_mode = get_mode(*m_out);
set_ascii_mode(*m_out);
_write_comment("BEGIN ARRANGEMENT");
@@ -285,7 +285,7 @@ public:
/*! Start reading an arrangement. */
void read_arrangement_begin()
{
- CGAL_assertion(m_in != NULL);
+ CGAL_assertion(m_in != nullptr);
m_old_in_mode = get_mode(*m_in);
set_ascii_mode(*m_in);
_skip_comments();
@@ -299,7 +299,7 @@ public:
}
/*! Read a size value (with a label comment line before it). */
- Size read_size(const char* /* title */ = NULL)
+ Size read_size(const char* /* title */ = nullptr)
{
std::size_t val;
@@ -448,7 +448,7 @@ protected:
/*! Skip until end of line. */
void _skip_until_EOL()
{
- CGAL_assertion(m_in != NULL);
+ CGAL_assertion(m_in != nullptr);
int c;
while ((c = m_in->get()) != EOF && c != '\n') {};
@@ -457,7 +457,7 @@ protected:
/*! Skip comment lines. */
void _skip_comments()
{
- CGAL_assertion(m_in != NULL);
+ CGAL_assertion(m_in != nullptr);
int c = m_in->get();
if (c == ' ')
diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h
index f54b55599eb..503dbfc365c 100644
--- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h
+++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h
@@ -124,7 +124,7 @@ namespace CGAL {
formatter.read_vertices_end();
// Read the DCEL halfedges and store them in the halfedges vector.
- DHalfedge* he = NULL;
+ DHalfedge* he = nullptr;
formatter.read_edges_begin();
m_halfedges.resize(number_of_halfedges);
@@ -179,7 +179,7 @@ namespace CGAL {
else
{
// Allocate a vertex at infinity.
- new_v = m_arr_access.new_vertex(NULL, ps_x, ps_y);
+ new_v = m_arr_access.new_vertex(nullptr, ps_x, ps_y);
}
formatter.read_vertex_end();
@@ -213,7 +213,7 @@ namespace CGAL {
else
{
// Allocate a new fictitious edge.
- new_he = m_arr_access.new_edge(NULL);
+ new_he = m_arr_access.new_edge(nullptr);
}
// Set the cross pointers between the twin halfedges and the end vertices.
@@ -276,7 +276,7 @@ namespace CGAL {
// Read the current outer CCB.
n = formatter.read_size("halfedges_on_outer_ccb");
- he = _read_ccb(formatter, n, new_occb, NULL);
+ he = _read_ccb(formatter, n, new_occb, nullptr);
new_f->add_outer_ccb(new_occb, he);
}
formatter.read_outer_ccbs_end();
@@ -293,7 +293,7 @@ namespace CGAL {
// Read the current inner CCB.
n = formatter.read_size("halfedges_on_inner_ccb");
- he = _read_ccb(formatter, n, NULL, new_iccb);
+ he = _read_ccb(formatter, n, nullptr, new_iccb);
new_f->add_inner_ccb(new_iccb, he);
}
formatter.read_inner_ccbs_end();
@@ -331,7 +331,7 @@ namespace CGAL {
* \param boundary_size The number of halfedges along the boundary.
* \param p_outer The outer CCB.
* \param p_inner The inner CCB.
- * \pre p_outer is valid and p_inner is NULL, or vice versa.
+ * \pre p_outer is valid and p_inner is nullptr, or vice versa.
* \return A pointer to the first halfedge read.
*/
template
@@ -340,8 +340,8 @@ namespace CGAL {
DOuter_ccb* p_outer,
DInner_ccb* p_inner)
{
- CGAL_assertion((p_outer != NULL && p_inner == NULL) ||
- (p_outer == NULL && p_inner != NULL));
+ CGAL_assertion((p_outer != nullptr && p_inner == nullptr) ||
+ (p_outer == nullptr && p_inner != nullptr));
formatter.read_ccb_halfedges_begin();
@@ -349,7 +349,7 @@ namespace CGAL {
std::size_t first_idx = formatter.read_halfedge_index();
DHalfedge* first_he = m_halfedges [first_idx];
- if (p_outer != NULL)
+ if (p_outer != nullptr)
first_he->set_outer_ccb(p_outer);
else
first_he->set_inner_ccb(p_inner);
@@ -369,7 +369,7 @@ namespace CGAL {
prev_he->set_next(curr_he);
// Set the CCB.
- if (p_outer != NULL)
+ if (p_outer != nullptr)
curr_he->set_outer_ccb(p_outer);
else
curr_he->set_inner_ccb(p_inner);
diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h
index e6948ad97d9..0b9713ea34a 100644
--- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h
+++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h
@@ -91,7 +91,7 @@ namespace CGAL {
/*! Constructor. */
Arrangement_2_writer(const Arrangement_2& arr) :
m_arr(arr),
- m_dcel(NULL),
+ m_dcel(nullptr),
m_curr_v(0),
m_curr_he(0)
{
@@ -328,7 +328,7 @@ namespace CGAL {
/*! Get the number of edges along a given CCB. */
std::size_t _circulator_size(const DHalfedge* ccb) const
{
- CGAL_assertion(ccb != NULL);
+ CGAL_assertion(ccb != nullptr);
std::size_t n = 0;
const DHalfedge* curr = ccb;
diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h
index 32d878ee56e..e8a02c683bd 100644
--- a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h
+++ b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h
@@ -1128,7 +1128,7 @@ public:
{
CGAL_precondition (_ofile.is_open());
- if (text == NULL || strlen(text) == 0)
+ if (text == nullptr || strlen(text) == 0)
return;
_write_text (pos,
diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h
index a3de06274e4..45838d6d45d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h
+++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h
@@ -116,7 +116,7 @@ template
bool Arr_insertion_ss_visitor::
is_split_event(Subcurve* sc, Event* event)
{
- if (sc->last_curve().halfedge_handle() == Halfedge_handle(NULL)) return false;
+ if (sc->last_curve().halfedge_handle() == Halfedge_handle(nullptr)) return false;
if (! sc->originating_subcurve1())
return (sc->left_event() != this->current_event());
diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h
index e98849b8aa9..7f91512dc88 100644
--- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h
@@ -127,7 +127,7 @@ public:
// X_monotone_curve_2
for(; oi != oi_end; ++oi) {
base_overlap_cv = object_cast(&(*oi));
- if (base_overlap_cv != NULL) {
+ if (base_overlap_cv != nullptr) {
// Add halfedge handles to the resulting curve.
Halfedge_handle he;
@@ -144,7 +144,7 @@ public:
intersect_p =
object_cast >(&(*oi));
- CGAL_assertion (intersect_p != NULL);
+ CGAL_assertion (intersect_p != nullptr);
*oi = make_object(std::make_pair(Point_2(intersect_p->first),
intersect_p->second));
diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h
index fc688892496..21a52219915 100644
--- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h
+++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h
@@ -457,19 +457,19 @@ after_handle_event(Event* event, Status_line_iterator iter, bool flag)
// point, we update the top fictitious halfedges for all subcurves incident
// to this event.
Event_subcurve_reverse_iterator rev_iter = event->right_curves_rbegin();
- Subcurve* sc_above = NULL;
+ Subcurve* sc_above = nullptr;
if (iter != this->status_line_end())
sc_above = (*iter);
- if (sc_above == NULL) {
+ if (sc_above == nullptr) {
if (rev_iter != event->right_curves_rend()) {
if ((*rev_iter)->color() == Gt2::BLUE)
(*rev_iter)->set_red_top_face(m_overlay_helper.red_top_face());
else if ((*rev_iter)->color() == Gt2::RED)
(*rev_iter)->set_blue_top_face(m_overlay_helper.blue_top_face());
- (*rev_iter)->set_subcurve_above(NULL);
+ (*rev_iter)->set_subcurve_above(nullptr);
sc_above = *rev_iter;
++rev_iter;
}
@@ -484,7 +484,7 @@ after_handle_event(Event* event, Status_line_iterator iter, bool flag)
if (! curr_sc->has_same_color(sc_above))
curr_sc->set_subcurve_above(sc_above);
else {
- if (sc_above->subcurve_above() != NULL)
+ if (sc_above->subcurve_above() != nullptr)
curr_sc->set_subcurve_above(sc_above->subcurve_above());
else
curr_sc->set_top_face(sc_above);
@@ -771,7 +771,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
// face. We have to find the identity of this containing blue face.
Subcurve* sc_above = sc->subcurve_above();
red_face = red_he->face();
- blue_face = (sc_above != NULL) ?
+ blue_face = (sc_above != nullptr) ?
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
}
else {
@@ -781,7 +781,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
// face. We have to find the identity of this containing red face.
Subcurve* sc_above = sc->subcurve_above();
blue_face = blue_he->face();
- red_face = (sc_above != NULL) ?
+ red_face = (sc_above != nullptr) ?
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
}
@@ -835,7 +835,7 @@ insert_isolated_vertex(const Point_2& pt,
// sufficient to go at most two steps up.
// There is nothing above the vertex - use the current red top face.
Subcurve* sc_above = *iter;
- if (sc_above == NULL) {
+ if (sc_above == nullptr) {
red_face = m_overlay_helper.red_top_face();
}
else {
@@ -844,7 +844,7 @@ insert_isolated_vertex(const Point_2& pt,
}
else {
sc_above = sc_above->subcurve_above();
- red_face = (sc_above != NULL) ?
+ red_face = (sc_above != nullptr) ?
sc_above->red_halfedge_handle()->face() :
m_overlay_helper.red_top_face();
}
@@ -871,7 +871,7 @@ insert_isolated_vertex(const Point_2& pt,
// sufficient to go at most two steps up.
// If we do not find a blue halfedge, we use the current red top face.
Subcurve* sc_above = *iter;
- if (sc_above == NULL) {
+ if (sc_above == nullptr) {
blue_face = m_overlay_helper.blue_top_face();
}
else {
@@ -880,7 +880,7 @@ insert_isolated_vertex(const Point_2& pt,
}
else {
sc_above = sc_above->subcurve_above();
- blue_face = (sc_above != NULL) ?
+ blue_face = (sc_above != nullptr) ?
sc_above->blue_halfedge_handle()->face() :
m_overlay_helper.blue_top_face();
}
@@ -991,20 +991,20 @@ _create_vertex(Event* event,
(event->parameter_space_in_y() != ARR_INTERIOR))
{
if (!red_handle) {
- CGAL_assertion(blue_handle != NULL);
+ CGAL_assertion(blue_handle != nullptr);
// Obtain the red face by looking for a subcurve above.
const Subcurve* sc_above = sc->subcurve_above();
- Face_handle_red red_f = (sc_above != NULL) ?
+ Face_handle_red red_f = (sc_above != nullptr) ?
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
Handle_info info = std::make_pair(Cell_handle_red(red_f), *blue_handle);
m_vertices_map[new_v] = info;
return;
}
if (!blue_handle) {
- CGAL_assertion(red_handle != NULL);
+ CGAL_assertion(red_handle != nullptr);
// Obtain the blue face by looking for a subcurve above.
const Subcurve* sc_above = sc->subcurve_above();
- Face_handle_blue blue_f = (sc_above != NULL) ?
+ Face_handle_blue blue_f = (sc_above != nullptr) ?
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
Handle_info info = std::make_pair(*red_handle, Cell_handle_blue(blue_f));
m_vertices_map[new_v] = info;
@@ -1034,10 +1034,10 @@ _create_vertex(Event* event,
// A blue vertex is located inside a red face. Obtain the red face
// by looking for a subcurve above.
const Subcurve* sc_above = sc->subcurve_above();
- Face_handle_red red_f = (sc_above != NULL) ?
+ Face_handle_red red_f = (sc_above != nullptr) ?
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
- CGAL_assertion(blue_handle != NULL);
+ CGAL_assertion(blue_handle != nullptr);
const Vertex_handle_blue& blue_v =
boost::get(*blue_handle);
m_overlay_traits->create_vertex(red_f, blue_v, new_v);
@@ -1048,10 +1048,10 @@ _create_vertex(Event* event,
// A red vertex is located inside a blue face. Obtain the blue face
// by looking for a subcurve above.
const Subcurve* sc_above = sc->subcurve_above();
- Face_handle_blue blue_f = (sc_above != NULL) ?
+ Face_handle_blue blue_f = (sc_above != nullptr) ?
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
- CGAL_assertion(red_handle != NULL);
+ CGAL_assertion(red_handle != nullptr);
const Vertex_handle_red& red_v =
boost::get(*red_handle);
m_overlay_traits->create_vertex(red_v, blue_f, new_v);
@@ -1088,7 +1088,7 @@ _create_edge(Subcurve* sc,
// We have a red edge on a blue face.
Halfedge_handle_red red_he = sc->red_halfedge_handle();
Subcurve* sc_above = sc->subcurve_above();
- Face_handle_blue blue_f = (sc_above != NULL) ?
+ Face_handle_blue blue_f = (sc_above != nullptr) ?
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
m_overlay_traits->create_edge(red_he, blue_f, new_he);
}
@@ -1098,7 +1098,7 @@ _create_edge(Subcurve* sc,
// We have a blue edge on a red face.
Halfedge_handle_blue blue_he = sc->blue_halfedge_handle();
Subcurve* sc_above = sc->subcurve_above();
- Face_handle_red red_f = (sc_above != NULL) ?
+ Face_handle_red red_f = (sc_above != nullptr) ?
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
m_overlay_traits->create_edge(red_f, blue_he, new_he);
}
diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h
index 07db8cba4d9..8453be6a7d8 100644
--- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h
+++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h
@@ -94,7 +94,7 @@ protected:
union {
const Face_red* red;
const Face_blue* blue;
- } m_top_face; // If m_above is NULL, points the top face in
+ } m_top_face; // If m_above is nullptr, points the top face in
// the arrangement of the opposite color that
// contains the subcurve.
@@ -102,14 +102,14 @@ public:
/*! Constructor. */
Arr_overlay_subcurve() :
Base(),
- m_above(NULL)
- { m_top_face.red = NULL; }
+ m_above(nullptr)
+ { m_top_face.red = nullptr; }
/*! constructor given a curve. */
Arr_overlay_subcurve(const X_monotone_curve_2& curve) :
Base(curve),
- m_above(NULL)
- { m_top_face.red = NULL; }
+ m_above(nullptr)
+ { m_top_face.red = nullptr; }
/*! Get the subcurve lying above above this subcurve in the status line. */
Self* subcurve_above() const { return m_above; }
@@ -149,10 +149,10 @@ public:
/*! Copy the top face from the given subcurve. */
void set_top_face(const Self* sc)
{
- CGAL_precondition(sc->m_above == NULL);
+ CGAL_precondition(sc->m_above == nullptr);
// Mark there is no curve above and copy the face pointer.
- m_above = NULL;
+ m_above = nullptr;
m_top_face.red = sc->m_top_face.red;
}
};
diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h
index 6df312301ba..e189ccf9761 100644
--- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h
@@ -314,25 +314,25 @@ public:
void set_blue_cell(const Optional_cell_blue& cell_blue)
{ m_blue_cell = cell_blue; }
- /*! Obtain the red cell handle or NULL if it doesn't exist. */
+ /*! Obtain the red cell handle or nullptr if it doesn't exist. */
const Cell_handle_red* red_cell_handle() const
- { return m_red_cell ? &(*m_red_cell) : NULL; }
+ { return m_red_cell ? &(*m_red_cell) : nullptr; }
- /*! Obtain the blue cell handle or NULL if it doesn't exist. */
+ /*! Obtain the blue cell handle or nullptr if it doesn't exist. */
const Cell_handle_blue* blue_cell_handle() const
- { return m_blue_cell ? &(*m_blue_cell) : NULL; }
+ { return m_blue_cell ? &(*m_blue_cell) : nullptr; }
- /*! Obtain the red vertex handle or NULL if it doesn't exist. */
+ /*! Obtain the red vertex handle or nullptr if it doesn't exist. */
const Vertex_handle_red* red_vertex_handle() const
{
- return m_red_cell ? boost::get(&(*m_red_cell)) : NULL;
+ return m_red_cell ? boost::get(&(*m_red_cell)) : nullptr;
}
- /*! Obtain the blue vertex handle or NULL if it doesn't exist. */
+ /*! Obtain the blue vertex handle or nullptr if it doesn't exist. */
const Vertex_handle_blue* blue_vertex_handle() const
{
return
- m_blue_cell ? boost::get(&(*m_blue_cell)) : NULL;
+ m_blue_cell ? boost::get(&(*m_blue_cell)) : nullptr;
}
};
@@ -437,7 +437,7 @@ public:
while (oi != oi_end) {
base_ipt = object_cast >(&(*oi));
- if (base_ipt != NULL) {
+ if (base_ipt != nullptr) {
// We have a red-blue intersection point, so we attach the
// intersecting red and blue halfedges to it.
Optional_cell_red red_cell;
@@ -464,7 +464,7 @@ public:
}
else {
overlap_xcv = object_cast(&(*oi));
- CGAL_assertion(overlap_xcv != NULL);
+ CGAL_assertion(overlap_xcv != nullptr);
// We have a red-blue overlap, so we mark the curve accordingly.
Halfedge_handle_red red_he;
diff --git a/BGL/doc/BGL/graph_traits.txt b/BGL/doc/BGL/graph_traits.txt
index b16313ed534..1413197ecc6 100644
--- a/BGL/doc/BGL/graph_traits.txt
+++ b/BGL/doc/BGL/graph_traits.txt
@@ -116,7 +116,7 @@ For convenience, the type `edge_descriptor` is hashable using the functor `CGAL:
- The item class used by `CGAL::Linear_cell_complex_for_combinatorial_map` must have both 0-attributes and 2-attributes enabled.
-- No dart is 1-free, nor 2-free. Holes in a mesh are represented by using the same convention than for `CGAL::Polyhedron_3` and `CGAL::Surface_mesh`: a dart
d belongs to a border if the 2-attribute of beta<2>(d) is NULL.
+- No dart is 1-free, nor 2-free. Holes in a mesh are represented by using the same convention than for `CGAL::Polyhedron_3` and `CGAL::Surface_mesh`: a dart
d belongs to a border if the 2-attribute of beta<2>(d) is nullptr.
- All darts of the linear cell complexes must be associated with a 2-attribute, except darts that represent holes.
diff --git a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h
index 8cf3c7884eb..6f0e29428a1 100644
--- a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h
+++ b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h
@@ -370,12 +370,12 @@ struct Face_filtered_graph
{}
Is_simplex_valid()
- :adapter(NULL)
+ :adapter(nullptr)
{}
template
bool operator()(Simplex s)
{
- CGAL_assertion(adapter!=NULL);
+ CGAL_assertion(adapter!=nullptr);
return (adapter->is_in_cc(s));
}
const Self* adapter;
diff --git a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h
index 7c515e3a608..28ec04e99ec 100644
--- a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h
+++ b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h
@@ -44,11 +44,11 @@ public:
Descriptor descriptor;
Gwdwg_descriptor()
- : graph(NULL), descriptor()
+ : graph(nullptr), descriptor()
{}
Gwdwg_descriptor(Descriptor descriptor)
- : graph(NULL), descriptor(descriptor)
+ : graph(nullptr), descriptor(descriptor)
{}
Gwdwg_descriptor(Descriptor descriptor, Graph& graph)
@@ -60,7 +60,7 @@ template
bool operator==(const Gwdwg_descriptor& lhs,
const Gwdwg_descriptor& rhs)
{
- CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
+ CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
return lhs.descriptor == rhs.descriptor;
}
@@ -75,7 +75,7 @@ template
bool operator<(const Gwdwg_descriptor& lhs,
const Gwdwg_descriptor& rhs)
{
- CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
+ CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
return lhs.descriptor < rhs.descriptor;
}
@@ -83,7 +83,7 @@ template
bool operator>(const Gwdwg_descriptor& lhs,
const Gwdwg_descriptor& rhs)
{
- CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
+ CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
return lhs.descriptor > rhs.descriptor;
}
@@ -91,7 +91,7 @@ template
bool operator<=(const Gwdwg_descriptor& lhs,
const Gwdwg_descriptor& rhs)
{
- CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
+ CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
return lhs.descriptor <= rhs.descriptor;
}
@@ -99,7 +99,7 @@ template
bool operator>=(const Gwdwg_descriptor& lhs,
const Gwdwg_descriptor& rhs)
{
- CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
+ CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
return lhs.descriptor >= rhs.descriptor;
}
@@ -142,7 +142,7 @@ struct Graph_with_descriptor_with_graph
typedef Gwdwg_descriptor face_descriptor;
Graph_with_descriptor_with_graph()
- : graph(NULL)
+ : graph(nullptr)
{}
Graph_with_descriptor_with_graph(Graph& graph)
@@ -156,7 +156,7 @@ struct Descriptor2Descriptor: public CGAL::cpp98::unary_function& gpm, const Descriptor& d)
{
- CGAL_assertion(gpm.graph!=NULL);
+ CGAL_assertion(gpm.graph!=nullptr);
CGAL_assertion(d.graph == gpm.graph);
return get(gpm.pm, d.descriptor);
}
@@ -738,7 +738,7 @@ struct Graph_with_descriptor_with_graph_property_map {
void
put(const Graph_with_descriptor_with_graph_property_map& gpm, const Descriptor& d, const value_type& v)
{
- CGAL_assertion(gpm.graph!=NULL);
+ CGAL_assertion(gpm.graph!=nullptr);
CGAL_assertion(d.graph == gpm.graph);
put(gpm.pm, d.descriptor, v);
}
@@ -762,7 +762,7 @@ struct Graph_with_descriptor_with_graph_property_map& gpm, const Descriptor& d)
{
- CGAL_assertion(gpm.graph!=NULL);
+ CGAL_assertion(gpm.graph!=nullptr);
CGAL_assertion(d.graph == gpm.graph);
return get(gpm.pm, d.descriptor);
}
@@ -784,7 +784,7 @@ struct Graph_with_descriptor_with_graph_property_map& gpm, const Descriptor& d, const value_type& v)
{
- CGAL_assertion(gpm.graph!=NULL);
+ CGAL_assertion(gpm.graph!=nullptr);
CGAL_assertion(d.graph == gpm.graph);
put(gpm.pm, d.descriptor, v);
}
diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h
index 7e2a15870a7..16b3a781025 100644
--- a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h
+++ b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h
@@ -97,11 +97,11 @@ void partition_dual_graph(const TriangleMesh& tm,
// partition info for the nodes
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
- CGAL_assertion(npart != NULL);
+ CGAL_assertion(npart != nullptr);
// partition info for the elements
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
- CGAL_assertion(epart != NULL);
+ CGAL_assertion(epart != nullptr);
// do not support Fortran-style arrays
CGAL_assertion((*options)[METIS_OPTION_NUMBERING] == -1 || // default initialization is '-1'
@@ -109,9 +109,9 @@ void partition_dual_graph(const TriangleMesh& tm,
CGAL_assertion_code(int ret =)
METIS_PartMeshDual(&ne, &nn, eptr, eind,
- NULL /* elements weights*/, NULL /*elements sizes*/,
+ nullptr /* elements weights*/, nullptr /*elements sizes*/,
&ncommon, &nparts,
- NULL /* partitions weights */,
+ nullptr /* partitions weights */,
*options,
&objval, epart, npart);
diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h
index d0f3e56b759..b63586b3bcb 100644
--- a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h
+++ b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h
@@ -129,11 +129,11 @@ void partition_graph(const TriangleMesh& tm,
// partition info for the nodes
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
- CGAL_assertion(npart != NULL);
+ CGAL_assertion(npart != nullptr);
// partition info for the elements
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
- CGAL_assertion(epart != NULL);
+ CGAL_assertion(epart != nullptr);
// do not support Fortran-style arrays
CGAL_assertion((*options)[METIS_OPTION_NUMBERING] == -1 || // default initialization is '-1'
@@ -141,9 +141,9 @@ void partition_graph(const TriangleMesh& tm,
CGAL_assertion_code(int ret =)
METIS_PartMeshNodal(&ne, &nn, eptr, eind,
- NULL /* nodes weights */, NULL /* nodes sizes */,
+ nullptr /* nodes weights */, nullptr /* nodes sizes */,
&nparts,
- NULL /* partitions weights */,
+ nullptr /* partitions weights */,
*options,
&objval, epart, npart);
diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h
index 73e35ae949e..2a85852d4ff 100644
--- a/BGL/include/CGAL/boost/graph/Seam_mesh.h
+++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h
@@ -236,7 +236,7 @@ public:
bool seam;
const Self* mesh_;
- halfedge_iterator() : hd(), end(), seam(false), mesh_(NULL) { }
+ halfedge_iterator() : hd(), end(), seam(false), mesh_(nullptr) { }
halfedge_iterator(const Iterator_range& ir, const Self* m)
: hd(ir.first), end(ir.second), seam(false), mesh_(m)
@@ -349,7 +349,7 @@ public:
public:
/// Constructors
- vertex_iterator() : hd(), end(), mesh_(NULL) { }
+ vertex_iterator() : hd(), end(), mesh_(nullptr) { }
vertex_iterator(const Iterator_range& ir, const Self* m)
: hd(ir.first), end(ir.second), mesh_(m)
@@ -432,7 +432,7 @@ public:
#endif
edge_descriptor()
- : mesh_(NULL)
+ : mesh_(nullptr)
{}
edge_descriptor(const halfedge_descriptor& hd, const Self* m)
@@ -469,7 +469,7 @@ public:
const Self* mesh_;
public:
- edge_iterator() : hd(), end(), seam(false), mesh_(NULL) { }
+ edge_iterator() : hd(), end(), seam(false), mesh_(nullptr) { }
edge_iterator(const Iterator_range& ir, const Self* m)
: hd(ir.first), end(ir.second), seam(false), mesh_(m)
diff --git a/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h b/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h
index b30f1e9bd13..20db9db7b48 100644
--- a/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h
+++ b/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h
@@ -161,7 +161,7 @@ public:
}
bool operator<( const Self& i) const {
- CGAL_assertion( m_anchor != NULL);
+ CGAL_assertion( m_anchor != nullptr);
CGAL_assertion( m_anchor == i.m_anchor);
return ( (m_winding < i.m_winding)
|| ( (m_winding == i.m_winding)
diff --git a/BGL/include/CGAL/boost/graph/iterator.h b/BGL/include/CGAL/boost/graph/iterator.h
index 83b3c001d71..c952e8f54a7 100644
--- a/BGL/include/CGAL/boost/graph/iterator.h
+++ b/BGL/include/CGAL/boost/graph/iterator.h
@@ -42,7 +42,7 @@ struct Edge {
const G* g;
Edge()
- : g(NULL)
+ : g(nullptr)
{}
Edge(const G& g)
@@ -63,7 +63,7 @@ struct Opposite_edge {
const G* g;
Opposite_edge()
- : g(NULL)
+ : g(nullptr)
{}
Opposite_edge(const G& g)
@@ -84,7 +84,7 @@ struct Opposite_halfedge {
const G* g;
Opposite_halfedge()
- : g(NULL)
+ : g(nullptr)
{}
Opposite_halfedge(const G& g)
@@ -105,7 +105,7 @@ struct Target {
const G* g;
Target()
- : g(NULL)
+ : g(nullptr)
{}
Target(const G& g)
@@ -126,7 +126,7 @@ struct Source {
const G* g;
Source()
- : g(NULL)
+ : g(nullptr)
{}
Source(const G& g)
@@ -147,7 +147,7 @@ struct Face {
const G* g;
Face()
- : g(NULL)
+ : g(nullptr)
{}
Face(const G& g)
@@ -167,7 +167,7 @@ struct Opposite_face {
const G* g;
Opposite_face()
- : g(NULL)
+ : g(nullptr)
{}
Opposite_face(const G& g)
@@ -230,7 +230,7 @@ public:
operator bool_type() const
{
- return (! (this->base() == NULL)) ?
+ return (! (this->base() == nullptr)) ?
&Halfedge_around_source_iterator::this_type_does_not_support_comparisons : 0;
}
@@ -245,7 +245,7 @@ public:
bool operator== (void* ) const
{
- return g == NULL;
+ return g == nullptr;
}
reference operator*() const
@@ -330,7 +330,7 @@ public:
operator bool_type() const
{
- return (! (this->base() == NULL)) ?
+ return (! (this->base() == nullptr)) ?
&Halfedge_around_target_iterator::this_type_does_not_support_comparisons : 0;
}
@@ -345,7 +345,7 @@ public:
bool operator== (void* ) const
{
- return g == NULL;
+ return g == nullptr;
}
reference operator*() const
@@ -429,7 +429,7 @@ public:
operator bool_type() const
{
- return (! (this->base() == NULL)) ?
+ return (! (this->base() == nullptr)) ?
&Halfedge_around_face_iterator::this_type_does_not_support_comparisons : 0;
}
@@ -444,7 +444,7 @@ public:
Self& operator++()
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
pos = next(pos,*g);
if ( pos == anchor)
++winding;
@@ -453,7 +453,7 @@ public:
Self operator++(int)
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
Self tmp = *this;
++*this;
return tmp;
@@ -461,7 +461,7 @@ public:
Self& operator--()
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
if ( pos == anchor)
--winding;
@@ -471,7 +471,7 @@ public:
Self operator--(int)
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
Self tmp = *this;
--*this;
return tmp;
@@ -539,13 +539,13 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&Halfedge_around_source_circulator::this_type_does_not_support_comparisons : 0;
}
bool operator== (void*) const
{
- return this->base_reference() == NULL;
+ return this->base_reference() == nullptr;
}
private:
@@ -597,13 +597,13 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&Face_around_target_circulator::this_type_does_not_support_comparisons : 0;
}
bool operator== (void*) const
{
- return this->base_reference() == NULL;
+ return this->base_reference() == nullptr;
}
@@ -672,27 +672,27 @@ public:
operator bool_type() const
{
- return (! (g == NULL)) ?
+ return (! (g == nullptr)) ?
&Halfedge_around_target_circulator::this_type_does_not_support_comparisons : 0;
}
bool operator== (void* ) const
{
- return g == NULL;
+ return g == nullptr;
}
Self& operator++()
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
pos = opposite(next(pos,*g),*g);
return *this;
}
Self operator++(int)
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
Self tmp = *this;
++*this;
return tmp;
@@ -700,14 +700,14 @@ public:
Self& operator--()
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
pos = prev(opposite(pos,*g),*g);
return *this;
}
Self operator--(int)
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
Self tmp = *this;
--*this;
return tmp;
@@ -769,25 +769,25 @@ public:
operator bool_type() const
{
- return (! (g == NULL)) ?
+ return (! (g == nullptr)) ?
&Halfedge_around_face_circulator::this_type_does_not_support_comparisons : 0;
}
bool operator== (void* ) const
{
- return g == NULL;
+ return g == nullptr;
}
Self& operator++()
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
pos = next(pos,*g);
return *this;
}
Self operator++(int)
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
Self tmp = *this;
++*this;
return tmp;
@@ -795,14 +795,14 @@ public:
Self& operator--()
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
pos = prev(pos,*g);
return *this;
}
Self operator--(int)
{
- CGAL_assertion(g != NULL);
+ CGAL_assertion(g != nullptr);
Self tmp = *this;
--*this;
return tmp;
@@ -1025,13 +1025,13 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&Vertex_around_face_circulator::this_type_does_not_support_comparisons : 0;
}
bool operator== (void*) const
{
- return this->base_reference()== NULL;
+ return this->base_reference()== nullptr;
}
private:
friend class boost::iterator_core_access;
@@ -1079,13 +1079,13 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&Vertex_around_face_iterator::this_type_does_not_support_comparisons : 0;
}
bool operator== (void*) const
{
- return this->base_reference()== NULL;
+ return this->base_reference()== nullptr;
}
private:
friend class boost::iterator_core_access;
@@ -1209,13 +1209,13 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&Vertex_around_target_circulator::this_type_does_not_support_comparisons : 0;
}
bool operator== (void*) const
{
- return this->base_reference()== NULL;
+ return this->base_reference()== nullptr;
}
private:
@@ -1267,7 +1267,7 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&Vertex_around_target_iterator::this_type_does_not_support_comparisons : 0;
}
private:
@@ -1354,7 +1354,7 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&Out_edge_iterator::this_type_does_not_support_comparisons : 0;
}
@@ -1396,7 +1396,7 @@ public:
operator bool_type() const
{
- return (! (this->base_reference() == NULL)) ?
+ return (! (this->base_reference() == nullptr)) ?
&In_edge_iterator::this_type_does_not_support_comparisons : 0;
}
diff --git a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h
index 4a2569c348a..300f1b8644e 100644
--- a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h
+++ b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h
@@ -197,7 +197,7 @@ public:
typedef typename boost::graph_traits::vertex_descriptor key_type;
OM_point_pmap()
- : sm_(NULL)
+ : sm_(nullptr)
{}
OM_point_pmap(const OpenMesh& sm)
@@ -213,7 +213,7 @@ public:
#if defined(CGAL_USE_OM_POINTS)
return sm_->point(v);
#else
- CGAL_assertion(sm_!=NULL);
+ CGAL_assertion(sm_!=nullptr);
typename OpenMesh::Point const& omp = sm_->point(v);
return value_type(omp[0], omp[1], omp[2]);
#endif
@@ -221,11 +221,11 @@ public:
inline friend reference get(const OM_point_pmap& pm, key_type v)
{
- CGAL_precondition(pm.sm_!=NULL);
+ CGAL_precondition(pm.sm_!=nullptr);
#if defined(CGAL_USE_OM_POINTS)
return pm.sm_->point(v);
#else
- CGAL_assertion(pm.sm_!=NULL);
+ CGAL_assertion(pm.sm_!=nullptr);
typename OpenMesh::Point const& omp = pm.sm_->point(v);
return value_type(omp[0], omp[1], omp[2]);
#endif
@@ -233,7 +233,7 @@ public:
inline friend void put(const OM_point_pmap& pm, key_type v, const value_type& p)
{
- CGAL_precondition(pm.sm_!=NULL);
+ CGAL_precondition(pm.sm_!=nullptr);
#if defined(CGAL_USE_OM_POINTS)
const_cast(*pm.sm_).set_point(v,p);
#else
diff --git a/BGL/include/CGAL/boost/graph/property_maps.h b/BGL/include/CGAL/boost/graph/property_maps.h
index fb6c8b486da..3df966fa436 100644
--- a/BGL/include/CGAL/boost/graph/property_maps.h
+++ b/BGL/include/CGAL/boost/graph/property_maps.h
@@ -38,7 +38,7 @@ struct Triangle_from_face_descriptor_map{
VertexPointMap m_vpm;
Triangle_from_face_descriptor_map()
- : m_tm(NULL)
+ : m_tm(nullptr)
{}
Triangle_from_face_descriptor_map(TriangleMesh const* tm)
@@ -93,7 +93,7 @@ template < class PolygonMesh,
struct Segment_from_edge_descriptor_map{
Segment_from_edge_descriptor_map()
- : m_pm(NULL)
+ : m_pm(nullptr)
{}
Segment_from_edge_descriptor_map(PolygonMesh const * pm)
@@ -143,7 +143,7 @@ template ::type >
struct One_point_from_face_descriptor_map{
One_point_from_face_descriptor_map()
- : m_pm(NULL)
+ : m_pm(nullptr)
{}
One_point_from_face_descriptor_map(PolygonMesh const * g)
@@ -187,7 +187,7 @@ struct One_point_from_face_descriptor_map{
template < class PolygonMesh,
class VertexPointMap = typename boost::property_map::type >
struct Source_point_from_edge_descriptor_map{
- Source_point_from_edge_descriptor_map() : m_pm(NULL)
+ Source_point_from_edge_descriptor_map() : m_pm(nullptr)
{}
Source_point_from_edge_descriptor_map(PolygonMesh const * g)
diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h
index c14ad00b0c8..2ab4df37c96 100644
--- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h
+++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h
@@ -50,7 +50,7 @@ protected:
public:
Gps_agg_curve_data() :
Base(),
- m_arr(NULL),
+ m_arr(nullptr),
m_bc(0),
m_twin_bc(0)
{}
@@ -195,7 +195,7 @@ public:
for (; oi != oi_end; ++oi) {
base_pt = object_cast >(&(*oi));
- if (base_pt != NULL) {
+ if (base_pt != nullptr) {
Point_2 point_plus(base_pt->first); // the extended point
*oi = CGAL::make_object(std::make_pair(point_plus,
base_pt->second));
@@ -203,7 +203,7 @@ public:
else {
overlap_cv = object_cast(&(*oi));
- if (overlap_cv != NULL) {
+ if (overlap_cv != nullptr) {
unsigned int ov_bc;
unsigned int ov_twin_bc;
if (m_base_cmp_endpoints(cv1) == m_base_cmp_endpoints(cv2)) {
diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h
index 562a381c35f..81c998ea5ed 100644
--- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h
+++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h
@@ -115,9 +115,9 @@ public:
/*! Destructor. */
~Gps_polygon_simplifier()
{
- if (m_own_traits && (m_traits != NULL)) {
+ if (m_own_traits && (m_traits != nullptr)) {
delete m_traits;
- m_traits = NULL;
+ m_traits = nullptr;
}
}
diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h
index 08a972a5c3f..9d835327bfc 100644
--- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h
+++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h
@@ -233,7 +233,7 @@ public:
{
base_pt = object_cast >(&(*oi));
- if (base_pt != NULL)
+ if (base_pt != nullptr)
{
Point_data pt_data(m_self_tr->invalid_index());
Point_2 point_plus (base_pt->first, pt_data); // the extended point
@@ -244,7 +244,7 @@ public:
{
overlap_cv = object_cast (&(*oi));
- if (overlap_cv != NULL)
+ if (overlap_cv != nullptr)
{
unsigned int ov_bc;
unsigned int ov_twin_bc;
diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h
index a38e9b81fe6..7ed21d63289 100644
--- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h
+++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h
@@ -483,7 +483,7 @@ public:
{
base_pt = object_cast >(&(*oi));
- if (base_pt != NULL)
+ if (base_pt != nullptr)
{
Point_2 point_plus (base_pt->first); // the extended point
*oi = CGAL::make_object(std::make_pair(point_plus,
@@ -492,7 +492,7 @@ public:
else
{
overlap_cv = object_cast (&(*oi));
- CGAL_assertion(overlap_cv != NULL);
+ CGAL_assertion(overlap_cv != nullptr);
*oi = CGAL::make_object (X_monotone_curve_2 (*overlap_cv));
}
}
diff --git a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h
index 74f0de011ae..dc92338bd70 100644
--- a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h
+++ b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h
@@ -422,7 +422,7 @@ inline std::ostream& BigFloatRep::operator<<(std::ostream& o) const {
/* Returns a std::string with precision and format specified
Works as cout << with the exception that if the output
- contains any error it returns a NULL
+ contains any error it returns a nullptr
Joaquin Grech 31/5/03
*/
inline std::string BigFloatRep::toString(long prec, bool sci) const {
@@ -434,7 +434,7 @@ inline std::string BigFloatRep::toString(long prec, bool sci) const {
else
return r.rep;
}
- return NULL;
+ return nullptr;
}
inline void BigFloatRep::dump() const {
diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h
index cf5a7007b9c..8812c482cf2 100644
--- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h
+++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h
@@ -1017,7 +1017,7 @@ void BigFloatRep :: fromString(const char *str, extLong prec ) {
const char *e = strchr(str, 'e');
int dot = 0;
long e10 = 0;
- if (e != NULL)
+ if (e != nullptr)
e10 = atol(e+1); // e10 is decimal precision of the input string
// i.e., input is A/10^{e10}.
else {
diff --git a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h
index ace587c3f7c..29a299b2ff1 100644
--- a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h
+++ b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h
@@ -55,7 +55,7 @@ void core_io_error_handler(const char *f, const char *m) {
CGAL_INLINE_FUNCTION
void core_io_memory_handler(char *t, const char *f, const char *m) {
- if (t == NULL) {
+ if (t == nullptr) {
std::cout << "\n memory_handler";
std::cout << "::" << f << "::" << m;
std::cout << "memory exhausted\n";
@@ -70,7 +70,7 @@ void allocate (char * &s, int old_size, int new_size) {
if (old_size > new_size)
old_size = new_size;
- if (s == NULL)
+ if (s == nullptr)
old_size = 0;
char *t = new char[new_size];
diff --git a/CGAL_Core/include/CGAL/CORE/Expr.h b/CGAL_Core/include/CGAL/CORE/Expr.h
index 19f87ecbef2..f14db82e49b 100644
--- a/CGAL_Core/include/CGAL/CORE/Expr.h
+++ b/CGAL_Core/include/CGAL/CORE/Expr.h
@@ -80,7 +80,7 @@ public:
* (or, for that matter, as a binary fraction of any finite length).
* The value is the closest double value determined by the compiler.
*/
- Expr(float f) : RCExpr(NULL) { // check for valid numbers
+ Expr(float f) : RCExpr(nullptr) { // check for valid numbers
// (i.e., not infinite and not NaN)
if (! CGAL_CORE_finite(f)) {
core_error(" ERROR : constructed an invalid float! ", __FILE__, __LINE__, false);
@@ -91,7 +91,7 @@ public:
rep = new ConstDoubleRep(f);
}
/// constructor for double
- Expr(double d) : RCExpr(NULL) { // check for valid numbers
+ Expr(double d) : RCExpr(nullptr) { // check for valid numbers
// (i.e., not infinite and not NaN)
if (! CGAL_CORE_finite(d)) {
core_error(" ERROR : constructed an invalid double! ", __FILE__, __LINE__, false);
diff --git a/CGAL_Core/include/CGAL/CORE/ExprRep.h b/CGAL_Core/include/CGAL/CORE/ExprRep.h
index c74c4fd7374..77026f580c5 100644
--- a/CGAL_Core/include/CGAL/CORE/ExprRep.h
+++ b/CGAL_Core/include/CGAL/CORE/ExprRep.h
@@ -168,7 +168,7 @@ public:
ExprRep();
/// virtual destructor for this base class
virtual ~ExprRep() {
- if (nodeInfo != NULL) // This check is only for optimization.
+ if (nodeInfo != nullptr) // This check is only for optimization.
delete nodeInfo;
}
//@}
diff --git a/CGAL_Core/include/CGAL/CORE/Expr_impl.h b/CGAL_Core/include/CGAL/CORE/Expr_impl.h
index 7be40c324c7..ac4e0366b65 100644
--- a/CGAL_Core/include/CGAL/CORE/Expr_impl.h
+++ b/CGAL_Core/include/CGAL/CORE/Expr_impl.h
@@ -181,14 +181,14 @@ NodeInfo::NodeInfo() : appValue(CORE_REAL_ZERO), appComputed(false),
v2p(EXTLONG_ZERO), v2m(EXTLONG_ZERO),
v5p(EXTLONG_ZERO), v5m(EXTLONG_ZERO),
u25(EXTLONG_ZERO), l25(EXTLONG_ZERO),
- ratFlag(0), ratValue(NULL) { }
+ ratFlag(0), ratValue(nullptr) { }
/********************************************************
* class ExprRep
********************************************************/
// constructor
CGAL_INLINE_FUNCTION
-ExprRep::ExprRep() : refCount(1), nodeInfo(NULL), ffVal(0.0) { }
+ExprRep::ExprRep() : refCount(1), nodeInfo(nullptr), ffVal(0.0) { }
// Computes the root bit bound of the expression.
// In effect, computeBound() returns the current value of low.
@@ -312,7 +312,7 @@ void ExprRep::reduceToBigRat(const BigRat& rat) {
lc() = l_e;
tc() = u_e;
- if (ratValue() == NULL)
+ if (ratValue() == nullptr)
ratValue() = new BigRat(rat);
else
*(ratValue()) = rat;
@@ -377,9 +377,9 @@ void ExprRep::reduceTo(const ExprRep *e) {
if (get_static_rationalReduceFlag()) {
ratFlag() = e->ratFlag();
- if (e->ratFlag() > 0 && e->ratValue() != NULL) {
+ if (e->ratFlag() > 0 && e->ratValue() != nullptr) {
ratFlag() ++;
- if (ratValue() == NULL)
+ if (ratValue() == nullptr)
ratValue() = new BigRat(*(e->ratValue()));
else
*(ratValue()) = *(e->ratValue());
@@ -417,7 +417,7 @@ void ExprRep::reduceToZero() {
if (get_static_rationalReduceFlag()) {
if (ratFlag() > 0) {
ratFlag() ++;
- if (ratValue() == NULL)
+ if (ratValue() == nullptr)
ratValue() = new BigRat(0);
else
*(ratValue()) = 0;
@@ -465,7 +465,7 @@ void ExprRep::approx(const extLong& relPrec = get_static_defRelPrec(),
// to avoid huge lMSB which would cause long time and problems.
// if it is a rational node
- if (get_static_rationalReduceFlag() && ratFlag() > 0 && ratValue() != NULL)
+ if (get_static_rationalReduceFlag() && ratFlag() > 0 && ratValue() != nullptr)
appValue() = Real(*(ratValue())).approx(relPrec, absPrec); //< shouldn't
// this case be done by computeApproxValue()?
else
@@ -556,15 +556,15 @@ void ConstRep::initNodeInfo() {
}
CGAL_INLINE_FUNCTION
void UnaryOpRep::initNodeInfo() {
- if (child->nodeInfo == NULL)
+ if (child->nodeInfo == nullptr)
child->initNodeInfo();
nodeInfo = new NodeInfo();
}
CGAL_INLINE_FUNCTION
void BinOpRep::initNodeInfo() {
- if (first->nodeInfo == NULL)
+ if (first->nodeInfo == nullptr)
first->initNodeInfo();
- if (second->nodeInfo == NULL)
+ if (second->nodeInfo == nullptr)
second->initNodeInfo();
nodeInfo = new NodeInfo();
}
@@ -780,7 +780,7 @@ void NegRep::computeExactFlags() {
}
if (get_static_rationalReduceFlag()) {
- if (child->ratFlag()>0 && child->ratValue() != NULL) {
+ if (child->ratFlag()>0 && child->ratValue() != nullptr) {
BigRat val = -(*(child->ratValue()));
reduceToBigRat(val);
ratFlag() = child->ratFlag()+1;
diff --git a/CGAL_Core/include/CGAL/CORE/MemoryPool.h b/CGAL_Core/include/CGAL/CORE/MemoryPool.h
index e7b87e5cc79..0f015768f99 100644
--- a/CGAL_Core/include/CGAL/CORE/MemoryPool.h
+++ b/CGAL_Core/include/CGAL/CORE/MemoryPool.h
@@ -93,7 +93,7 @@ public:
// Access the corresponding static global allocator.
static MemoryPool& global_allocator() {
#if CGAL_STATIC_THREAD_LOCAL_USE_BOOST || (defined(CGAL_HAS_THREADS) && BOOST_GCC)
- if(memPool_ptr.get() == NULL) {memPool_ptr.reset(new Self());}
+ if(memPool_ptr.get() == nullptr) {memPool_ptr.reset(new Self());}
Self& memPool = * memPool_ptr.get();
#endif
return memPool;
diff --git a/CGAL_Core/include/CGAL/CORE/Real.h b/CGAL_Core/include/CGAL/CORE/Real.h
index e6792debb8a..3640dce6f17 100644
--- a/CGAL_Core/include/CGAL/CORE/Real.h
+++ b/CGAL_Core/include/CGAL/CORE/Real.h
@@ -46,11 +46,11 @@ typedef RCImpl RCReal;
class Real : public RCReal {
public:
Real(int i=0) : RCReal(new RealLong(i)) {}
- Real(unsigned int ui) : RCReal(NULL) {
+ Real(unsigned int ui) : RCReal(nullptr) {
(ui<=INT_MAX) ? (rep=new RealLong(static_cast(ui))) : (rep=new RealBigInt(ui));
}
Real(long l) : RCReal(new RealLong(l)) {}
- Real(unsigned long ul) : RCReal(NULL) {
+ Real(unsigned long ul) : RCReal(nullptr) {
(ul<=LONG_MAX) ? (rep=new RealLong(static_cast(ul))) : (rep=new RealBigInt(ul));
}
Real(float f) : RCReal(new RealDouble(f)) {}
@@ -58,10 +58,10 @@ public:
Real(const BigInt& I) : RCReal(new RealBigInt(I)) {}
Real(const BigRat& R) : RCReal(new RealBigRat(R)) {}
Real(const BigFloat& F) : RCReal(new RealBigFloat(F)) {}
- Real(const char* s, const extLong& prec=get_static_defInputDigits()) : RCReal(NULL) {
+ Real(const char* s, const extLong& prec=get_static_defInputDigits()) : RCReal(nullptr) {
constructFromString(s, prec);
}
- Real(const std::string& s, const extLong& prec=get_static_defInputDigits()) : RCReal(NULL){
+ Real(const std::string& s, const extLong& prec=get_static_defInputDigits()) : RCReal(nullptr){
constructFromString(s.c_str(), prec);
}
diff --git a/CGAL_Core/include/CGAL/CORE/Real_impl.h b/CGAL_Core/include/CGAL/CORE/Real_impl.h
index 77ad9123fe8..3346e862f7b 100644
--- a/CGAL_Core/include/CGAL/CORE/Real_impl.h
+++ b/CGAL_Core/include/CGAL/CORE/Real_impl.h
@@ -134,7 +134,7 @@ void Real::constructFromString(const char *str, const extLong& prec )
// Moreover, the value of prec is ignored (basically
// assumed to be infinity).
- if (std::strchr(str, '/') != NULL) { // this is a rational number
+ if (std::strchr(str, '/') != nullptr) { // this is a rational number
rep = new RealBigRat(BigRat(str));
return;
}
@@ -142,7 +142,7 @@ void Real::constructFromString(const char *str, const extLong& prec )
const char *e = std::strchr(str, 'e');
int dot = 0;
long e10 = 0;
- if (e != NULL)
+ if (e != nullptr)
e10 = std::atol(e+1); // e10 is decimal precision of the input string
// i.e., input is A/10^{e10}.
else {
diff --git a/CGAL_Core/include/CGAL/CORE/poly/Poly.h b/CGAL_Core/include/CGAL/CORE/poly/Poly.h
index 913c4773c7a..29a11e6ef82 100644
--- a/CGAL_Core/include/CGAL/CORE/poly/Poly.h
+++ b/CGAL_Core/include/CGAL/CORE/poly/Poly.h
@@ -179,7 +179,7 @@ public:
const NT & getTailCoeff() const; // get last non-zero coefficient
NT** getCoeffs() ; // get all coefficients
const NT& getCoeff(int i) const; // Get single coefficient of X^i
- // NULL pointer if invalid i
+ // nullptr pointer if invalid i
// Set functions
bool setCoeff(int i, const NT & cc); // Make cc the coefficient of X^i
// Return FALSE if invalid i
@@ -408,7 +408,7 @@ NT** Polynomial::getCoeffs() {
template < class NT >
CORE_INLINE
const NT& Polynomial::getCoeff(int i) const {
- //if (i > degree) return NULL;
+ //if (i > degree) return nullptr;
CGAL_assertion(i <= degree);
return coeff[i];
}
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO.h b/CGAL_ImageIO/include/CGAL/ImageIO.h
index 1ec9ca750fb..e4fed7772f1 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO.h
@@ -324,9 +324,9 @@ CGAL_IMAGEIO_EXPORT _image *_createImage(int x, int y, int z, int v,
WORD_KIND wk, SIGN sgn);
-/** Reads an image from a file and returns an image descriptor or NULL if
+/** Reads an image from a file and returns an image descriptor or nullptr if
reading failed.
- Reads from stdin if image name is NULL.
+ Reads from stdin if image name is nullptr.
The image data field points to a xdim * ydim * zdim * vdim buffer
containing voxels in order:
(Z1, Y1, X1, V1) (Z1, Y1, X1, V2), ... , (Z1, Y1, X1, Vt),
@@ -354,12 +354,12 @@ CGAL_IMAGEIO_EXPORT _image *_createImage(int x, int y, int z, int v,
http://www.gzip.org/zlib/
- @param name image file name or NULL for stdin */
+ @param name image file name or nullptr for stdin */
CGAL_IMAGEIO_EXPORT _image* _readImage(const char *name);
-/** Reads an image from a file and returns an image descriptor or NULL if
+/** Reads an image from a file and returns an image descriptor or nullptr if
reading failed.
- Reads from stdin if image name is NULL.
+ Reads from stdin if image name is nullptr.
If the image is vectorial, it is uninterlaced, i.e. the image data
field points to a xdim * ydim * zdim * vdim buffer containing voxels
in order:
@@ -372,7 +372,7 @@ CGAL_IMAGEIO_EXPORT _image* _readImage(const char *name);
(V2, Z1, Y1, X1) ... ... , (V2, Z1, Y1, Xn),
...
... ... , (Vt, Zl, Ym, Xn)
- @param name image file name or NULL */
+ @param name image file name or nullptr */
CGAL_IMAGEIO_EXPORT _image* _readNonInterlacedImage(const char *name);
/** Read an image from a file. The word type is supposed to be unsigned
@@ -393,15 +393,15 @@ CGAL_IMAGEIO_EXPORT _image* _readImage_raw(const char *name,
/** Writes given image in file 'name'.
If name ends with '.gz', file is gzipped.
- If name is NULL, image is sent to stdout.
+ If name is nullptr, image is sent to stdout.
@param im image descriptor
- @param name file name to store image or NULL */
+ @param name file name to store image or nullptr */
CGAL_IMAGEIO_EXPORT int _writeImage(_image *im, const char *name);
/** Read one slice of given image whose header has already been read.
File descriptor is let at the beginning of next slice and closed
when end of file is encountered.
- If data buffer is NULL, it is allocated for one slice only.
+ If data buffer is nullptr, it is allocated for one slice only.
This funtion is dedicated to read huge inrimages.
@param im image descriptor */
CGAL_IMAGEIO_EXPORT void _getNextSlice(_image *im);
@@ -420,8 +420,8 @@ CGAL_IMAGEIO_EXPORT PTRIMAGE_FORMAT firstImageFormat();
/** Reads header from an image file
If file is an inrimage, only header is read. Otherwise, whole image
is read and image file descriptor is closed.
- If name is NULL, header is read from STDIN
- @param name image file name or NULL */
+ If name is nullptr, header is read from STDIN
+ @param name image file name or nullptr */
CGAL_IMAGEIO_EXPORT _image* _readImageHeader(const char *name);
CGAL_IMAGEIO_EXPORT _image *_readImageHeaderAndGetError( const char *name, int *error );
@@ -445,13 +445,13 @@ CGAL_IMAGEIO_EXPORT int _readNonInterlacedFileData(_image *im);
/** given an initialized file descriptor and a file name, open file
- from stdout (if name == NULL), a gziped pipe (if file is gziped)
+ from stdout (if name == nullptr), a gziped pipe (if file is gziped)
or a standard file otherwise.
@param im initialized image descriptor
@param name image file name */
CGAL_IMAGEIO_EXPORT void _openWriteImage(_image* im, const char *name) ;
-/** open an image file from stdin (if name == NULL), from a pipe
+/** open an image file from stdin (if name == nullptr), from a pipe
(piped with gzip if image was compressed) or from a standard file
@param im initialized image descriptor
@param name image file name */
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/analyze_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/analyze_impl.h
index 88a3a086562..581d716fef2 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/analyze_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/analyze_impl.h
@@ -249,7 +249,7 @@ int writeAnalyze( char *name, _image* im) {
_openWriteImage(im, outputName);
if( !im->fd ) {
fprintf(stderr, "writeAnalyze: error: unable to open file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return ImageIO_OPENING;
}
@@ -257,9 +257,9 @@ int writeAnalyze( char *name, _image* im) {
if ( res < 0 ) {
fprintf(stderr, "writeAnalyze: error: unable to write header of \'%s\'\n",
outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return( res );
}
@@ -278,7 +278,7 @@ int writeAnalyze( char *name, _image* im) {
if( !im->fd ) {
fprintf(stderr, "writeAnalyze: error: unable to open file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return ImageIO_OPENING;
}
@@ -287,14 +287,14 @@ int writeAnalyze( char *name, _image* im) {
fprintf(stderr, "writeAnalyze: error: unable to write data in \'%s\'\n",
outputName );
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return( res );
}
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return ( res );
@@ -469,7 +469,7 @@ int _readAnalyzeHeader( _image* im, const char* name,
*/
im->nuser = 1 + 17 ;
im->user = (char **) ImageIO_alloc(im->nuser * sizeof(char *));
- for ( i=0; inuser; i++ ) im->user[i] = NULL;
+ for ( i=0; inuser; i++ ) im->user[i] = nullptr;
i = 0 ;
im->user[i] = (char *) ImageIO_alloc((strlen("Data lost in the Analyze -> ImageIO conversion:") + 1));
@@ -529,7 +529,7 @@ int _readAnalyzeHeader( _image* im, const char* name,
/* header is read. close header file and open data file. */
- if( name != NULL ) {
+ if( name != nullptr ) {
std::size_t length = strlen(name) ;
char* data_filename = (char *) ImageIO_alloc(length+4) ;
@@ -841,7 +841,7 @@ int printAnalyzeHeader( const char* name )
ImageIO_close(im);
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
_freeImage(im);
return( 1 );
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h
index cf58cb98cbe..8068ce94f28 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h
@@ -84,7 +84,7 @@ int readBmpImage( const char *name,_image *im)
int dimx, dimy, dimv;
im->data = _readBmpImage( name, &dimx, &dimy, &dimv );
- if ( im->data == NULL ) {
+ if ( im->data == nullptr ) {
fprintf( stderr, "readBmpImage: unable to read \'%s\'\n", name );
return( -1 );
}
@@ -109,23 +109,23 @@ void *_readBmpImage( const char *name,
int *dimx, int *dimy, int *dimz )
{
const char *proc="_readBmpImage";
- void *buf = (void*)NULL;
- unsigned char *myBuf = NULL;
+ void *buf = (void*)nullptr;
+ unsigned char *myBuf = nullptr;
- FILE *fp = NULL;
- RGB **argbs = NULL;
- char **xorMasks = NULL, **andMasks = NULL;
- CGAL_UINT32 *heights = NULL, *widths = NULL, row = 0, col = 0;
+ FILE *fp = nullptr;
+ RGB **argbs = nullptr;
+ char **xorMasks = nullptr, **andMasks = nullptr;
+ CGAL_UINT32 *heights = nullptr, *widths = nullptr, row = 0, col = 0;
CGAL_UINT16 fileType = 0;
long filePos = 0;
int numImages = 0, i = 0;
int rc = 0;
fp = fopen(name, "rb");
- if (fp == NULL) {
+ if (fp == nullptr) {
if ( get_static_verbose_bmp() )
fprintf( stderr, "%s: error in opening %s\n", proc, name );
- return( (void*)NULL );
+ return( (void*)nullptr );
}
@@ -139,7 +139,7 @@ void *_readBmpImage( const char *name,
fclose(fp);
if ( get_static_verbose_bmp() )
fprintf( stderr, "%s: error in getting file type %s\n", proc, name );
- return( (void*)NULL );
+ return( (void*)nullptr );
}
fseek(fp, filePos, SEEK_SET);
@@ -168,20 +168,20 @@ void *_readBmpImage( const char *name,
* those arrays.
*/
argbs = (RGB **)calloc(1, sizeof(RGB *));
- if (argbs == NULL)
+ if (argbs == nullptr)
{
rc = 1005;
break;
}
xorMasks = (char **)calloc(1, sizeof(char *));
- if (xorMasks == NULL)
+ if (xorMasks == nullptr)
{
free(argbs);
rc = 1005;
break;
}
andMasks = (char **)calloc(1, sizeof(char *));
- if (andMasks == NULL)
+ if (andMasks == nullptr)
{
free(argbs);
free(xorMasks);
@@ -189,7 +189,7 @@ void *_readBmpImage( const char *name,
break;
}
heights = (CGAL_UINT32 *)calloc(1, sizeof(CGAL_UINT32));
- if (heights == NULL)
+ if (heights == nullptr)
{
free(argbs);
free(xorMasks);
@@ -198,7 +198,7 @@ void *_readBmpImage( const char *name,
break;
}
widths = (CGAL_UINT32 *)calloc(1, sizeof(CGAL_UINT32));
- if (widths == NULL)
+ if (widths == nullptr)
{
free(argbs);
free(xorMasks);
@@ -278,11 +278,11 @@ void *_readBmpImage( const char *name,
{
for (i=0; i 0) &&
- (argbs[0] != NULL) ) {
+ (argbs[0] != nullptr) ) {
buf = (void*)malloc( widths[0]*heights[0]*3 * sizeof( unsigned char ) );
- if ( buf == (void*)NULL ) {
+ if ( buf == (void*)nullptr ) {
if ( get_static_verbose_bmp() )
fprintf( stderr, "%s: error in allocating data buffer for %s\n", proc, name );
for (i=0; i 0 && str[l-1] == '\n') str[l-1] = '\0';
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h
index 7e9e81c3dfe..91845111980 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h
@@ -88,11 +88,11 @@ static int ReadCode();
static void DoInterlace(byte);
static int GifError(const char *);
-CGAL_GLOBAL_STATE_VAR(byte *, Raster, NULL) /* The raster data stream, unblocked */
-CGAL_GLOBAL_STATE_VAR(byte *, RawGIF, NULL)
-CGAL_GLOBAL_STATE_VAR(byte *, r, NULL)
-CGAL_GLOBAL_STATE_VAR(byte *, g, NULL)
-CGAL_GLOBAL_STATE_VAR(byte *, b, NULL) /* The colormap */
+CGAL_GLOBAL_STATE_VAR(byte *, Raster, nullptr) /* The raster data stream, unblocked */
+CGAL_GLOBAL_STATE_VAR(byte *, RawGIF, nullptr)
+CGAL_GLOBAL_STATE_VAR(byte *, r, nullptr)
+CGAL_GLOBAL_STATE_VAR(byte *, g, nullptr)
+CGAL_GLOBAL_STATE_VAR(byte *, b, nullptr) /* The colormap */
CGAL_GLOBAL_STATE_VAR(int, BitOffset, 0) /* Bit Offset of next code */
CGAL_GLOBAL_STATE_VAR(int, XC, 0)
CGAL_GLOBAL_STATE_VAR(int, YC, 0) /* Output X and Y coords of current pixel */
@@ -101,8 +101,8 @@ CGAL_GLOBAL_STATE_VAR(int, ReadMask, 0) /* Code AND mask for current code si
CGAL_GLOBAL_STATE_VAR(int, Pass, 0) /* Used by output routine if interlaced pic */
CGAL_GLOBAL_STATE_VAR(int, Width, 0)
CGAL_GLOBAL_STATE_VAR(int, Height, 0) /* image dimensions */
-CGAL_GLOBAL_STATE_VAR(unsigned char *, org, NULL)
-CGAL_GLOBAL_STATE_VAR(unsigned char *, buf, NULL)
+CGAL_GLOBAL_STATE_VAR(unsigned char *, org, nullptr)
+CGAL_GLOBAL_STATE_VAR(unsigned char *, buf, nullptr)
CGAL_INLINE_FUNCTION
int testGifHeader(char *magic,const char *) {
@@ -173,7 +173,7 @@ int gif89 = 0;
OutCount =
npixels =
maxpixels = 0;
- get_static_RawGIF() = get_static_Raster() = NULL;
+ get_static_RawGIF() = get_static_Raster() = nullptr;
gif89 = 0;
#ifdef WIN32
@@ -465,7 +465,7 @@ int gif89 = 0;
break;
}
} while(ch1);
- ImageIO_free(get_static_RawGIF()); get_static_RawGIF() = NULL;
+ ImageIO_free(get_static_RawGIF()); get_static_RawGIF() = nullptr;
if (DEBUG) {
@@ -597,7 +597,7 @@ int gif89 = 0;
Code = ReadCode();
if (npixels >= maxpixels) break;
}
- ImageIO_free(get_static_Raster()); get_static_Raster() = NULL;
+ ImageIO_free(get_static_Raster()); get_static_Raster() = nullptr;
if (npixels != maxpixels) {
/* SetISTR(ISTR_WARNING,"This GIF file seems to be truncated. Winging it.");*/
@@ -637,7 +637,7 @@ static int ReadCode()
/***************************/
CGAL_INLINE_FUNCTION
static void DoInterlace(byte Index) {
- static byte *ptr = NULL;
+ static byte *ptr = nullptr;
static int oldYC = -1;
if (oldYC != get_static_YC()) {
@@ -693,8 +693,8 @@ CGAL_INLINE_FUNCTION
static int GifError(const char *st) {
fprintf(stderr,"readGifImage: error: %s\n",st);
- if (get_static_RawGIF() != NULL) ImageIO_free(get_static_RawGIF());
- if (get_static_Raster() != NULL) ImageIO_free(get_static_Raster());
+ if (get_static_RawGIF() != nullptr) ImageIO_free(get_static_RawGIF());
+ if (get_static_Raster() != nullptr) ImageIO_free(get_static_Raster());
return -1;
}
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h
index 1b5b81f43b8..4fd5714cfed 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h
@@ -78,16 +78,16 @@ int writeGis( char *name, _image* im) {
_openWriteImage(im, outputName);
if( !im->fd ) {
fprintf(stderr, "writeGis: error: unable to open file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return ImageIO_OPENING;
}
if ( !writeGisHeader(im) ) {
fprintf(stderr, "writeGis: error: unable to write header of \'%s\'\n",
outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return -1;
}
@@ -106,7 +106,7 @@ int writeGis( char *name, _image* im) {
if( !im->fd ) {
fprintf(stderr, "writeGis: error: unable to open file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return ImageIO_OPENING;
}
@@ -120,19 +120,19 @@ int writeGis( char *name, _image* im) {
switch( im->wordKind ) {
default :
fprintf(stderr, "writeGis: such word kind not handled in ascii mode for file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
case WK_FIXED :
switch ( im->wdim ) {
default :
fprintf(stderr, "writeGis: such word dim not handled in ascii mode for file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
case 1 :
switch ( im->sign ) {
default :
fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
case SGN_UNSIGNED :
{
@@ -148,7 +148,7 @@ int writeGis( char *name, _image* im) {
res = (done == strlen( str )) ? int(done) : -1;
if ( res <= 0 ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
}
} while ( i < size );
@@ -168,7 +168,7 @@ int writeGis( char *name, _image* im) {
res = (done == strlen( str )) ? int(done) : -1;
if ( res <= 0 ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
}
} while ( i < size );
@@ -180,7 +180,7 @@ int writeGis( char *name, _image* im) {
switch ( im->sign ) {
default :
fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
case SGN_UNSIGNED :
{
@@ -196,7 +196,7 @@ int writeGis( char *name, _image* im) {
res = (done == strlen( str )) ? int(done) : -1;
if ( res <= 0 ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
}
} while ( i < size );
@@ -216,7 +216,7 @@ int writeGis( char *name, _image* im) {
res = (done == strlen( str )) ? int(done) : -1;
if ( res <= 0 ) {
fprintf(stderr, "writeGis: error when writing data in \'%s\'\n", outputName);
- if ( outputName != NULL ) ImageIO_free( outputName );
+ if ( outputName != nullptr ) ImageIO_free( outputName );
return( -3 );
}
} while ( i < size );
@@ -228,12 +228,12 @@ int writeGis( char *name, _image* im) {
} /* end of switch( im->wordKind ) */
ImageIO_free( str );
- if (outputName != NULL) ImageIO_free(outputName);
+ if (outputName != nullptr) ImageIO_free(outputName);
return static_cast(res);
}
else {
bool ret = _writeInrimageData(im);
- if (outputName != NULL) ImageIO_free(outputName);
+ if (outputName != nullptr) ImageIO_free(outputName);
return (ret ? 1 : -1);
}
}
@@ -254,7 +254,7 @@ int testGisHeader(char *,const char *name) {
CGAL_INLINE_FUNCTION
int readGisHeader( const char* name,_image* im)
{
- char *s, *str = NULL;
+ char *s, *str = nullptr;
int status;
int n=0, nusermax = 20;
@@ -286,7 +286,7 @@ int readGisHeader( const char* name,_image* im)
#define ADD_USER_STRING { \
if ( n == 0 ) { \
im->user = (char**)ImageIO_alloc( nusermax * sizeof( char*) ); \
- for ( n=0; nuser[n] = NULL; \
+ for ( n=0; nuser[n] = nullptr; \
n = 0; \
} \
im->user[n] = (char*)ImageIO_alloc( 1+strlen( s ) ); \
@@ -472,7 +472,7 @@ int readGisHeader( const char* name,_image* im)
/* header is read. close header file and open data file. */
- if( name != NULL ) {
+ if( name != nullptr ) {
std::size_t length = strlen(name) ;
char* data_filename = (char *) ImageIO_alloc(length+4) ;
@@ -554,14 +554,14 @@ int readGisHeader( const char* name,_image* im)
ret = sscanf( tmp, "%d", &iv );
break;
default :
- ImageIO_free( im->data ); im->data = NULL;
+ ImageIO_free( im->data ); im->data = nullptr;
ImageIO_free( str );
return -1;
}
if ( ret != 1 ) {
fprintf( stderr, "readGisHeader: error in reading ascii data\n" );
- ImageIO_free( im->data ); im->data = NULL;
+ ImageIO_free( im->data ); im->data = nullptr;
ImageIO_free( str );
return -1;
}
@@ -607,7 +607,7 @@ int readGisHeader( const char* name,_image* im)
n ++;
}
else {
- ImageIO_free( im->data ); im->data = NULL;
+ ImageIO_free( im->data ); im->data = nullptr;
ImageIO_free( str );
return -1;
}
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/inr_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/inr_impl.h
index c7f410d24e3..168d8b0ff46 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/inr_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/inr_impl.h
@@ -164,9 +164,9 @@ int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
/* write user strings */
- if ( im->user != NULL ) {
+ if ( im->user != nullptr ) {
for(i = 0; i < im->nuser; i++) {
- if ( im->user[i] == NULL ) continue;
+ if ( im->user[i] == nullptr ) continue;
pos += strlen(im->user[i]) + 2;
if(ImageIO_write(im, "#", 1) == 0) return -1;
if(ImageIO_write(im, im->user[i], strlen(im->user[i])) == 0) return -1;
@@ -236,7 +236,7 @@ CGAL_INLINE_FUNCTION
int readInrimageHeader(const char *,_image *im) {
char str[257];
int n, nusr;
- stringListHead strl = { NULL, NULL };
+ stringListHead strl = { nullptr, nullptr };
stringListElement *oel, *el;
Set_numeric_locale num_locale("C");
@@ -412,8 +412,8 @@ int readInrimageHeader(const char *,_image *im) {
if(nusr > 0) {
im->nuser = nusr;
im->user = (char **) ImageIO_alloc(im->nuser * sizeof(char *));
- oel = NULL;
- for(el = strl.begin, n = 0; el != NULL; el = oel, n++) {
+ oel = nullptr;
+ for(el = strl.begin, n = 0; el != nullptr; el = oel, n++) {
im->user[n] = el->string;
oel = el->next;
ImageIO_free(el);
@@ -437,8 +437,8 @@ static void addStringElement(stringListHead *strhead, const char *str) {
/* was strdup(str); */
el->string = (char*)ImageIO_alloc( strlen(str)+1);
memcpy(el->string, str, strlen(str)+1);
- el->next = NULL;
- if(strhead->begin == NULL)
+ el->next = nullptr;
+ if(strhead->begin == nullptr)
strhead->begin = strhead->end = el;
else {
strhead->end->next = el;
@@ -481,7 +481,7 @@ int writeInrimage(char *name,_image *im) {
fprintf(stderr, "writeInrimage: error: unable to write header of \'%s\'\n",
name);
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return( res );
}
@@ -490,13 +490,13 @@ int writeInrimage(char *name,_image *im) {
fprintf(stderr, "writeInrimage: error: unable to write data of \'%s\'\n",
name);
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return -1;
}
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return ( res );
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/iris_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/iris_impl.h
index 7b711d84725..10d88dc35c3 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/iris_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/iris_impl.h
@@ -357,7 +357,7 @@ static byte *getimagedata(const _image *im, unsigned short type, int xsize, int
int zsize)
{
/* read in a B/W RGB or RGBA iris image file and return a
- pointer to an array of 4-byte pixels, arranged ABGR, NULL on error */
+ pointer to an array of 4-byte pixels, arranged ABGR, nullptr on error */
byte *base, *lptr;
byte *verdat;
@@ -372,7 +372,7 @@ static byte *getimagedata(const _image *im, unsigned short type, int xsize, int
bpp = BPP(type);
if (bpp != 1) {
- return (byte *) NULL;
+ return (byte *) nullptr;
}
if (rle) {
@@ -392,7 +392,7 @@ static byte *getimagedata(const _image *im, unsigned short type, int xsize, int
if ( ImageIO_error(im) ) {
ImageIO_free(starttab); ImageIO_free(lengthtab); ImageIO_free(rledat);
- return (byte *) NULL;
+ return (byte *) nullptr;
}
@@ -427,7 +427,7 @@ static byte *getimagedata(const _image *im, unsigned short type, int xsize, int
if (lengthtab[y+z*ysize]>(unsigned long)rlebuflen) {
ImageIO_free(starttab); ImageIO_free(lengthtab); ImageIO_free(rledat); ImageIO_free(base);
- return (byte *) NULL;
+ return (byte *) nullptr;
}
ImageIO_read(im, rledat, (size_t) lengthtab[y+z*ysize]);
cur += lengthtab[y+z*ysize];
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/mincio_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/mincio_impl.h
index 72026b5df3a..60bc76ec70d 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/mincio_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/mincio_impl.h
@@ -65,7 +65,7 @@ int readMincHeader(_image *im, const char* filename,
/* get number of dimensions and type */
id = ncvarid(fin, MIimage);
- (void) ncvarinq(fin, id, NULL, &type, &ndims, dim, NULL);
+ (void) ncvarinq(fin, id, nullptr, &type, &ndims, dim, nullptr);
if(ndims != 3) {
fprintf(stderr, "unsupported %i dimensional minc file\n", ndims);
return 0;
@@ -73,7 +73,7 @@ int readMincHeader(_image *im, const char* filename,
/* get sign */
if ((miattgetstr(fin, id, MIsigntype, MI_MAX_ATTSTR_LEN, sign_type)
- == NULL) || ((strcmp(sign_type, MI_UNSIGNED)!=0) &&
+ == nullptr) || ((strcmp(sign_type, MI_UNSIGNED)!=0) &&
(strcmp(sign_type, MI_SIGNED)!=0))) {
if (type == NC_BYTE)
(void) strcpy(sign_type, MI_UNSIGNED);
@@ -252,9 +252,9 @@ int readMincHeader(_image *im, const char* filename,
ImageIO_closeImage(im);
/* order data in ZYX */
- (void) ncdiminq(fin, dim[0], name, NULL);
+ (void) ncdiminq(fin, dim[0], name, nullptr);
if(!strcmp(name, MIzspace)) {
- (void) ncdiminq(fin, dim[1], name, NULL);
+ (void) ncdiminq(fin, dim[1], name, nullptr);
/* file is ZYX */
if(!strcmp(name, MIyspace)) {
miclose(fin);
@@ -262,7 +262,7 @@ int readMincHeader(_image *im, const char* filename,
}
}
- (void) ncdiminq(fin, dim[0], name, NULL);
+ (void) ncdiminq(fin, dim[0], name, nullptr);
/* file is ZXY */
if(!strcmp(name, MIzspace)) {
shift[0] = 0;
@@ -275,7 +275,7 @@ int readMincHeader(_image *im, const char* filename,
else if(!strcmp(name, MIyspace)) {
shift[0] = 1;
plane2 = im->xdim * im->zdim;
- (void) ncdiminq(fin, dim[1], name, NULL);
+ (void) ncdiminq(fin, dim[1], name, nullptr);
/* file is YXZ */
if(!strcmp(name, MIxspace)) {
shift[1] = 2;
@@ -293,7 +293,7 @@ int readMincHeader(_image *im, const char* filename,
else {
shift[0] = 2;
plane2 = im->ydim * im->zdim;
- (void) ncdiminq(fin, dim[1], name, NULL);
+ (void) ncdiminq(fin, dim[1], name, nullptr);
/* file is XYZ */
if(!strcmp(name, MIyspace)) {
shift[1] = 1;
@@ -398,7 +398,7 @@ int writeMincFile( const _image* im, const char *filename,
for(i = 0; i < 3; i++ ) {
dim_ids[i] = micreate_std_variable( cdfid, dim_names[i], NC_DOUBLE,
- 0, NULL);
+ 0, nullptr);
if( dim_ids[i] < 0 ) return -1;
(void) miattputdbl( cdfid, dim_ids[i], MIstep, vx[i]);
(void) miattputdbl( cdfid, dim_ids[i], MIstart, start[i]);
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/pnm_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/pnm_impl.h
index 41835232be7..bc5563718e5 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/pnm_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/pnm_impl.h
@@ -263,7 +263,7 @@ int writePpmImage( char *name,_image *im )
*/
unsigned short *buf = (unsigned short *)im->data;
unsigned char *tmp = (unsigned char *)ImageIO_alloc( im->xdim*im->ydim*3 );
- if ( tmp == NULL ) {
+ if ( tmp == nullptr ) {
fprintf( stderr, "writePpmImage: unable to allocate auxiliary buffer\n" );
return -1;
}
@@ -377,12 +377,12 @@ int readPgmAsciiImage(const char *name,_image *im)
case WK_FIXED :
if ( sscanf( tmp, "%d", &iv ) != 1 ) {
fprintf( stderr, "readAsciiPgmImage: error in reading ascii data\n" );
- ImageIO_free( im->data ); im->data = NULL;
+ ImageIO_free( im->data ); im->data = nullptr;
return 0;
}
break;
default :
- ImageIO_free( im->data ); im->data = NULL;
+ ImageIO_free( im->data ); im->data = nullptr;
return 0;
}
@@ -404,7 +404,7 @@ int readPgmAsciiImage(const char *name,_image *im)
}
else {
fprintf( stderr, "readAsciiPgmImage: word im not handled\n" );
- ImageIO_free( im->data ); im->data = NULL;
+ ImageIO_free( im->data ); im->data = nullptr;
return 0;
}
@@ -624,7 +624,7 @@ int writePgmImage(char *name,_image *im )
*/
unsigned short *buf = (unsigned short *)im->data;
unsigned char *tmp = (unsigned char *)ImageIO_alloc( im->xdim*im->ydim );
- if ( tmp == NULL ) {
+ if ( tmp == nullptr ) {
fprintf( stderr, "writePgmImage: unable to allocate auxiliary buffer\n" );
return -1;
}
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer_impl.h
index ef2866787be..8b910aa2eba 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer_impl.h
@@ -99,8 +99,8 @@ int GradientModulus( void *bufferIn,
recursiveFilterType filterType )
{
const char *proc = "GradientModulus";
- float *auxBuf = NULL;
- float *tmpBuf = NULL, *grdBuf = NULL;
+ float *auxBuf = nullptr;
+ float *tmpBuf = nullptr, *grdBuf = nullptr;
int sizeAuxBuf = 0;
derivativeOrder derivatives[3];
int i;
@@ -114,7 +114,7 @@ int GradientModulus( void *bufferIn,
/* allocation des buffers de calcul
*/
auxBuf = (float*)malloc( sizeAuxBuf * sizeof(float) );
- if ( auxBuf == NULL ) {
+ if ( auxBuf == nullptr ) {
if ( _VERBOSE_ > 0 )
fprintf( stderr, "%s: unable to allocate auxiliary buffer\n", proc );
return( EXIT_ON_FAILURE );
@@ -265,15 +265,15 @@ int Laplacian_2D ( void *bufferIn,
recursiveFilterType filterType )
{
const char *proc = "Laplacian_2D";
- float *theXX = NULL;
- float *theYY = NULL;
+ float *theXX = nullptr;
+ float *theYY = nullptr;
derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING, NODERIVATIVE };
derivativeOrder YYderiv[3] = { SMOOTHING, DERIVATIVE_2, NODERIVATIVE };
int sliceDims[3];
int z, i, dimxXdimy;
- void *sliceOut = NULL;
+ void *sliceOut = nullptr;
@@ -312,7 +312,7 @@ int Laplacian_2D ( void *bufferIn,
theXX = (float*)malloc( 2 * dimxXdimy * sizeof( float ) );
}
- if ( theXX == NULL ) {
+ if ( theXX == nullptr ) {
if ( _VERBOSE_ > 0 ) {
fprintf( stderr, " Fatal error in %s:", proc );
fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
@@ -407,9 +407,9 @@ int Laplacian ( void *bufferIn,
recursiveFilterType filterType )
{
const char *proc = "Laplacian";
- float *theSL = NULL;
- float *theZZ = NULL;
- float *theZ0 = NULL;
+ float *theSL = nullptr;
+ float *theZZ = nullptr;
+ float *theZ0 = nullptr;
derivativeOrder XXderiv[3] = { DERIVATIVE_2, SMOOTHING, NODERIVATIVE };
@@ -466,7 +466,7 @@ int Laplacian ( void *bufferIn,
- if ( theSL == NULL ) {
+ if ( theSL == nullptr ) {
if ( _VERBOSE_ > 0 ) {
fprintf( stderr, " Fatal error in %s:", proc );
fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
@@ -610,11 +610,11 @@ int GradientHessianGradient_2D ( void *bufferIn,
recursiveFilterType filterType )
{
const char *proc = "GradientHessianGradient_2D";
- float *theXX = NULL;
- float *theYY = NULL;
- float *theXY = NULL;
- float *theX = NULL;
- float *theY = NULL;
+ float *theXX = nullptr;
+ float *theYY = nullptr;
+ float *theXY = nullptr;
+ float *theX = nullptr;
+ float *theY = nullptr;
derivativeOrder Xsmooth[3] = { SMOOTHING, NODERIVATIVE, NODERIVATIVE };
derivativeOrder Yderiv[3] = { NODERIVATIVE, DERIVATIVE_1_EDGES, NODERIVATIVE };
@@ -629,8 +629,8 @@ int GradientHessianGradient_2D ( void *bufferIn,
int sliceDims[3];
int z, i, dimxXdimy;
- void *sliceIn = NULL;
- void *sliceOut = NULL;
+ void *sliceIn = nullptr;
+ void *sliceOut = nullptr;
double gx, gy, g;
@@ -669,7 +669,7 @@ int GradientHessianGradient_2D ( void *bufferIn,
theXX = (float*)malloc( 5 * dimxXdimy * sizeof( float ) );
}
- if ( theXX == NULL ) {
+ if ( theXX == nullptr ) {
if ( _VERBOSE_ > 0 ) {
fprintf( stderr, " Fatal error in %s:", proc );
fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
@@ -872,20 +872,20 @@ int GradientHessianGradient ( void *bufferIn,
- float *theZZ = NULL;
- float *theZ = NULL;
- float *theZ1 = NULL;
- float *theZ0 = NULL;
+ float *theZZ = nullptr;
+ float *theZ = nullptr;
+ float *theZ1 = nullptr;
+ float *theZ0 = nullptr;
- float *theXZ = NULL;
- float *theYZ = NULL;
+ float *theXZ = nullptr;
+ float *theYZ = nullptr;
- float *theXX = NULL;
- float *theYY = NULL;
- float *theXY = NULL;
+ float *theXX = nullptr;
+ float *theYY = nullptr;
+ float *theXY = nullptr;
- float *theX = NULL;
- float *theY = NULL;
+ float *theX = nullptr;
+ float *theY = nullptr;
derivativeOrder ZZderiv[3] = { SMOOTHING, SMOOTHING, DERIVATIVE_2 };
@@ -949,7 +949,7 @@ int GradientHessianGradient ( void *bufferIn,
}
- if ( theX == NULL ) {
+ if ( theX == nullptr ) {
if ( _VERBOSE_ > 0 ) {
fprintf( stderr, " Fatal error in %s:", proc );
fprintf( stderr, " unable to allocate auxiliary buffer.\n" );
@@ -1228,9 +1228,9 @@ int RecursiveFilterOnBuffer( void *bufferIn,
* we allocate an auxiliary buffer if the output buffer
* is not of type float or double.
*/
- void *bufferToBeProcessed = (void*)NULL;
+ void *bufferToBeProcessed = (void*)nullptr;
bufferType typeToBeProcessed = TYPE_UNKNOWN;
- void *bufferResult = (void*)NULL;
+ void *bufferResult = (void*)nullptr;
bufferType typeResult = TYPE_UNKNOWN;
/*
* lines' lengths
@@ -1245,28 +1245,28 @@ int RecursiveFilterOnBuffer( void *bufferIn,
/*
* 1D arrays for computations.
*/
- double *theLine = (double*)NULL;
- double *resLine = (double*)NULL;
- double *tmpLine = (double*)NULL;
+ double *theLine = (double*)nullptr;
+ double *resLine = (double*)nullptr;
+ double *tmpLine = (double*)nullptr;
/*
* pointers for computations;
*/
- r32 *r32firstPoint = (r32*)NULL;
- r64 *r64firstPoint = (r64*)NULL;
- r32 *r32_pt = (r32*)NULL;
- r64 *r64_pt = (r64*)NULL;
- double *dbl_pt1 = (double*)NULL;
- double *dbl_pt2 = (double*)NULL;
+ r32 *r32firstPoint = (r32*)nullptr;
+ r64 *r64firstPoint = (r64*)nullptr;
+ r32 *r32_pt = (r32*)nullptr;
+ r64 *r64_pt = (r64*)nullptr;
+ double *dbl_pt1 = (double*)nullptr;
+ double *dbl_pt2 = (double*)nullptr;
double dbl_first = 0.0;
double dbl_last = 0.0;
int offsetLastPoint = 0;
int offsetNextFirstPoint = 0;
- r32 *r32firstPointResult = (r32*)NULL;
- r64 *r64firstPointResult = (r64*)NULL;
- double *theLinePlusBorder = (double*)NULL;
- double *resLinePlusBorder = (double*)NULL;
+ r32 *r32firstPointResult = (r32*)nullptr;
+ r64 *r64firstPointResult = (r64*)nullptr;
+ double *theLinePlusBorder = (double*)nullptr;
+ double *resLinePlusBorder = (double*)nullptr;
- RFcoefficientType *RFC = NULL;
+ RFcoefficientType *RFC = nullptr;
/*
* We check the buffers' dimensions.
@@ -1281,9 +1281,9 @@ int RecursiveFilterOnBuffer( void *bufferIn,
/*
* We check the pointers.
*/
- if ( (bufferIn == (void*)NULL) || (bufferOut == (void*)NULL) ) {
+ if ( (bufferIn == (void*)nullptr) || (bufferOut == (void*)nullptr) ) {
if ( _VERBOSE_ > 0 )
- fprintf( stderr, " Fatal error in %s: NULL pointer on buffer.\n", proc );
+ fprintf( stderr, " Fatal error in %s: nullptr pointer on buffer.\n", proc );
return( EXIT_ON_FAILURE );
}
@@ -1297,7 +1297,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
typeResult = typeOut;
} else {
bufferResult = (void*)malloc( (dimx*dimy*dimz) * sizeof(r32) );
- if ( bufferResult == (void*)NULL ) {
+ if ( bufferResult == (void*)nullptr ) {
if ( _VERBOSE_ > 0 )
fprintf( stderr, " Fatal error in %s: unable to allocate auxiliary buffer.\n", proc );
return( EXIT_ON_FAILURE );
@@ -1323,7 +1323,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
/*
* Estimation of the lines' length along each direction.
*/
- if ( borderLengths != NULL ) {
+ if ( borderLengths != nullptr ) {
borderXlength = borderLengths[0];
borderYlength = borderLengths[1];
borderZlength = borderLengths[2];
@@ -1354,7 +1354,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
* We will use them to process each line.
*/
theLine = (double*)malloc( 3 * maxLengthline * sizeof(double) );
- if ( theLine == (double*)NULL ) {
+ if ( theLine == (double*)nullptr ) {
if ( _VERBOSE_ > 0 )
fprintf( stderr, " Fatal error in %s: unable to allocate auxiliary work arrays.\n", proc );
if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
@@ -1383,7 +1383,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
RFC = InitRecursiveCoefficients( (double)filterCoefs[0], filterType, derivatives[0] );
- if ( RFC == NULL ) {
+ if ( RFC == nullptr ) {
if ( _VERBOSE_ != 0 )
fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
@@ -1466,7 +1466,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
typeToBeProcessed = typeResult;
free( RFC );
- RFC = NULL;
+ RFC = nullptr;
} /* end of Processing along X. */
@@ -1482,7 +1482,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
RFC = InitRecursiveCoefficients( (double)filterCoefs[1], filterType, derivatives[1] );
- if ( RFC == NULL ) {
+ if ( RFC == nullptr ) {
if ( _VERBOSE_ != 0 )
fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
@@ -1601,7 +1601,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
typeToBeProcessed = typeResult;
free( RFC );
- RFC = NULL;
+ RFC = nullptr;
} /* end of Processing along Y. */
@@ -1618,7 +1618,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
RFC = InitRecursiveCoefficients( (double)filterCoefs[2], filterType, derivatives[2] );
- if ( RFC == NULL ) {
+ if ( RFC == nullptr ) {
if ( _VERBOSE_ != 0 )
fprintf( stderr, " %s: unable to allocate coefficients\n", proc );
if ( (typeOut != CGAL_FLOAT) && (typeOut != CGAL_DOUBLE) )
@@ -1707,7 +1707,7 @@ int RecursiveFilterOnBuffer( void *bufferIn,
}
free( RFC );
- RFC = NULL;
+ RFC = nullptr;
} /* end of Processing along Z. */
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h
index 34f4917a4bd..cf5a9fe2865 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h
@@ -105,12 +105,12 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
double cos0, sin0, cos1, sin1;
double sumA=0.0, sumC=0.0, aux;
- RFcoefficientType *RFC = NULL;
+ RFcoefficientType *RFC = nullptr;
RFC = (RFcoefficientType *)malloc( sizeof(RFcoefficientType) );
- if ( RFC == NULL ) {
+ if ( RFC == nullptr ) {
if ( get_static_verbose_recline() != 0 )
fprintf( stderr, "%s: allocation failed\n", proc );
- return( NULL );
+ return( nullptr );
}
RFC->sd1 = RFC->sd2 = RFC->sd3 = RFC->sd4 = 0.0;
@@ -137,7 +137,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
}
free( RFC );
- return( NULL );
+ return( nullptr );
}
switch ( derivative ) {
@@ -146,7 +146,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
fprintf( stderr, "%s: improper value of derivative order.\n", proc );
}
free( RFC );
- return( NULL );
+ return( nullptr );
case DERIVATIVE_0 :
a0 = 0.6570033214 / x;
a1 = 1.978946687 / x;
@@ -217,7 +217,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
fprintf( stderr, "%s: improper value of derivative order.\n", proc );
}
free( RFC );
- return( NULL );
+ return( nullptr );
case DERIVATIVE_0 :
case DERIVATIVE_2 :
RFC->sn1 = RFC->sp1 - RFC->sd1 * RFC->sp0;
@@ -245,7 +245,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
}
free( RFC );
- return( NULL );
+ return( nullptr );
}
switch ( derivative ) {
@@ -444,7 +444,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1 and <= 1.9).\n", proc );
}
free( RFC );
- return( NULL );
+ return( nullptr );
}
ex = exp( (-x) );
diff --git a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h
index 70581bbc45c..c91d700a254 100644
--- a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h
+++ b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h
@@ -80,13 +80,13 @@ struct Remove_supported_file_format {
inline PTRIMAGE_FORMAT & get_static_firstFormat()
{
- static PTRIMAGE_FORMAT firstFormat = NULL;
+ static PTRIMAGE_FORMAT firstFormat = nullptr;
return firstFormat;
}
inline PTRIMAGE_FORMAT & get_static_inrimageFormat()
{
- static PTRIMAGE_FORMAT inrimageFormat = NULL;
+ static PTRIMAGE_FORMAT inrimageFormat = nullptr;
return inrimageFormat;
}
@@ -102,14 +102,14 @@ CGAL_UNUSED static Remove_supported_file_format &rsff_dummy_ref = get_static_rsf
#else // not header-only
/** the first file format is initialized to null */
-static PTRIMAGE_FORMAT firstFormat = NULL;
+static PTRIMAGE_FORMAT firstFormat = nullptr;
inline PTRIMAGE_FORMAT & get_static_firstFormat()
{
return firstFormat;
}
/** the Inrimage file format (default format) is initialized to null */
-static PTRIMAGE_FORMAT InrimageFormat = NULL;
+static PTRIMAGE_FORMAT InrimageFormat = nullptr;
inline PTRIMAGE_FORMAT & get_static_inrimageFormat()
{
return InrimageFormat;
@@ -294,11 +294,11 @@ size_t ImageIO_read(const _image *im, void *buf, size_t len)
CGAL_INLINE_FUNCTION
char *ImageIO_gets( const _image *im, char *str, int size )
{
- char *ret = NULL;
+ char *ret = nullptr;
switch(im->openMode) {
default :
case OM_CLOSE :
- return NULL;
+ return nullptr;
case OM_STD :
#ifdef CGAL_USE_ZLIB
ret = (char *) gzgets(im->fd, str, size );
@@ -401,7 +401,7 @@ int ImageIO_close( _image* im )
#endif
}
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
return ret;
@@ -414,7 +414,7 @@ int ImageIO_close( _image* im )
/* given an initialized file descriptor and a file name,
- open file from stdin (if name == NULL, or name == "-", or name == "<"),
+ open file from stdin (if name == nullptr, or name == "-", or name == "<"),
or a standard/gzipped file otherwise (gzipped files are handled assuming
that it is compiled and linked with zlib).
openMode will have one of the following value:
@@ -426,7 +426,7 @@ void _openReadImage(_image* im, const char *name) {
if(im->openMode == OM_CLOSE) {
/* open from stdin */
- if( name == NULL || name[0] == '\0'
+ if( name == nullptr || name[0] == '\0'
|| (name[0] == '-' && name[1] == '\0')
|| (name[0] == '<' && name[1] == '\0') ) {
#ifdef CGAL_USE_ZLIB
@@ -456,7 +456,7 @@ void _openReadImage(_image* im, const char *name) {
/* given an initialized file descriptor and a file name,
- open file from stdout (if name == NULL, or name == "-", or name == ">"),
+ open file from stdout (if name == nullptr, or name == "-", or name == ">"),
a gzipped pipe (if name got the extension ".gz")
or a standard file otherwise.
openMode will have one of the following value:
@@ -469,7 +469,7 @@ void _openWriteImage(_image* im, const char *name)
{
im->openMode = OM_CLOSE;
- if( name == NULL || name[0] == '\0'
+ if( name == nullptr || name[0] == '\0'
|| (name[0] == '-' && name[1] == '\0')
|| (name[0] == '>' && name[1] == '\0') ) {
@@ -529,8 +529,8 @@ void _openWriteImage(_image* im, const char *name)
CGAL_INLINE_FUNCTION
void setImageIOAllocationRoutines(ALLOCATION_FUNCTION alloc,
DEALLOCATION_FUNCTION del) {
- if(alloc != NULL) allocRoutine = alloc;
- if(del != NULL) deleteRoutine = del;
+ if(alloc != nullptr) allocRoutine = alloc;
+ if(del != nullptr) deleteRoutine = del;
}
@@ -575,7 +575,7 @@ _image *_initImage() {
_image *im;
im = (_image *) ImageIO_alloc(sizeof(_image));
- if ( im == NULL ) return( im );
+ if ( im == nullptr ) return( im );
/* default image size is 1*1*1 */
im->xdim = im->ydim = im->zdim = im->vdim = 1;
@@ -592,10 +592,10 @@ _image *_initImage() {
im->rx = im->ry = im->rz = 0.0;
/* no data yet */
- im->data = NULL;
+ im->data = nullptr;
/* no file associated to image */
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
im->endianness = END_UNKNOWN;
@@ -605,7 +605,7 @@ _image *_initImage() {
im->dataMode = DM_BINARY;
/* no user string */
- im->user = NULL;
+ im->user = nullptr;
im->nuser = 0;
/* unknown word kind */
@@ -613,10 +613,10 @@ _image *_initImage() {
im->wordKind = WK_UNKNOWN;
im->vectMode = VM_SCALAR;
im->sign = SGN_UNKNOWN;
- im->imageFormat = NULL;
+ im->imageFormat = nullptr;
/** eventually initializes the supported file formats */
- if (get_static_firstFormat()==NULL)
+ if (get_static_firstFormat()==nullptr)
initSupportedFileFormat();
/* return image descriptor */
return im;
@@ -630,7 +630,7 @@ _image *_createImage(int x, int y, int z, int v,
_image *im;
im = (_image *) ImageIO_alloc(sizeof(_image));
- if ( im == NULL ) return( im );
+ if ( im == nullptr ) return( im );
im->xdim = x;
im->ydim = y;
@@ -653,7 +653,7 @@ _image *_createImage(int x, int y, int z, int v,
im->data = ImageIO_alloc(std::size_t(x)*std::size_t(y)*std::size_t(z)*std::size_t(v)*std::size_t(w));
/* no file associated to image */
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
im->endianness = END_UNKNOWN;
@@ -663,7 +663,7 @@ _image *_createImage(int x, int y, int z, int v,
im->dataMode = DM_BINARY;
/* no user string */
- im->user = NULL;
+ im->user = nullptr;
im->nuser = 0;
/* unknown word kind */
@@ -671,10 +671,10 @@ _image *_createImage(int x, int y, int z, int v,
im->wordKind = wk;
im->vectMode = VM_SCALAR;
im->sign = sgn;
- im->imageFormat = NULL;
+ im->imageFormat = nullptr;
/** eventually initializes the supported file formats */
- if (get_static_firstFormat()==NULL)
+ if (get_static_firstFormat()==nullptr)
initSupportedFileFormat();
/* return image descriptor */
return im;
@@ -698,23 +698,23 @@ CGAL_INLINE_FUNCTION
void _freeImage(_image *im) {
unsigned int i;
- if ( im == NULL ) return;
+ if ( im == nullptr ) return;
/* close image if opened */
if(im->openMode != OM_CLOSE) ImageIO_close(im);
/* free data if any */
- if(im->data != NULL) ImageIO_free(im->data);
- im->data = NULL;
+ if(im->data != nullptr) ImageIO_free(im->data);
+ im->data = nullptr;
/* free user string array if any */
- if( (im->nuser > 0) && (im->user != NULL) ) {
+ if( (im->nuser > 0) && (im->user != nullptr) ) {
for(i = 0; i < im->nuser; i++)
- if ( im->user[i] != NULL ) ImageIO_free(im->user[i]);
+ if ( im->user[i] != nullptr ) ImageIO_free(im->user[i]);
ImageIO_free(im->user);
}
im->nuser = 0;
- im->user = NULL;
+ im->user = nullptr;
/* free given descriptor */
ImageIO_free(im);
@@ -724,9 +724,9 @@ void _freeImage(_image *im) {
-/* Reads an image from a file and returns an image descriptor or NULL if
+/* Reads an image from a file and returns an image descriptor or nullptr if
reading failed.
- Reads from stdin if image name is NULL. */
+ Reads from stdin if image name is nullptr. */
CGAL_INLINE_FUNCTION
_image* _readImage(const char *name) {
_image *im;
@@ -735,13 +735,13 @@ _image* _readImage(const char *name) {
/* read header */
im = _readImageHeader( name );
- if(im != NULL && im->openMode != OM_CLOSE) {
+ if(im != nullptr && im->openMode != OM_CLOSE) {
/* read body */
if(_readImageData(im) < 0) {
fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
name);
_freeImage(im);
- return NULL;
+ return nullptr;
}
ImageIO_close(im);
}
@@ -764,10 +764,10 @@ _image* _readImage_raw(const char *name,
SIGN sgned
)
{
- _image *im = NULL;
+ _image *im = nullptr;
im = (_image *) ImageIO_alloc(sizeof(_image));
- if ( im == NULL )
- return NULL;
+ if ( im == nullptr )
+ return nullptr;
im->xdim = rx;
im->ydim = ry;
@@ -787,14 +787,14 @@ _image* _readImage_raw(const char *name,
im->rx = im->ry = im->rz = 0.0;
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
im->endianness = END_UNKNOWN;
im->dataMode = DM_BINARY;
// no user string
- im->user = NULL;
+ im->user = nullptr;
im->nuser = 0;
// word type (unsigned byte)
@@ -802,14 +802,14 @@ _image* _readImage_raw(const char *name,
im->wordKind = wk;
im->vectMode = VM_SCALAR;
im->sign = sgned;
- im->imageFormat = NULL;
+ im->imageFormat = nullptr;
// read file
::_openReadImage(im, name);
if(!im->fd) {
fprintf(stderr, "_readImage_raw: error: unable to open file \'%s\'\n", name);
_freeImage(im);
- return NULL;
+ return nullptr;
}
// read offset
@@ -820,8 +820,8 @@ _image* _readImage_raw(const char *name,
}
// allocate memory
im->data = ImageIO_alloc(rx*ry*rz*wdim);
- if(im->data == NULL)
- return NULL;
+ if(im->data == nullptr)
+ return nullptr;
// read
ImageIO_read(im, im->data, rx*ry*rz*wdim);
@@ -844,9 +844,9 @@ _image* _readImage_raw(const char *name,
return im;
}
-/* Reads an image from a file and returns an image descriptor or NULL if
+/* Reads an image from a file and returns an image descriptor or nullptr if
reading failed.
- Reads from stdin if image name is NULL.
+ Reads from stdin if image name is nullptr.
If the image is vectorial, it is uninterlaced. */
CGAL_INLINE_FUNCTION
_image* _readNonInterlacedImage(const char *name) {
@@ -862,7 +862,7 @@ _image* _readNonInterlacedImage(const char *name) {
fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
name);
_freeImage(im);
- return NULL;
+ return nullptr;
}
}
/* read vectorial image body */
@@ -872,7 +872,7 @@ _image* _readNonInterlacedImage(const char *name) {
fprintf(stderr, "_readImage: error: invalid data encountered in \'%s\'\n",
name);
_freeImage(im);
- return NULL;
+ return nullptr;
}
}
ImageIO_close(im);
@@ -893,23 +893,23 @@ _image* _readNonInterlacedImage(const char *name) {
/* Write inrimage given in inr in file name. If file name's suffix is
.gz, the image is gziped. If file name's suffix is .hdr, the image
- is written in ANALYZE format. If file name is NULL, image is written
+ is written in ANALYZE format. If file name is nullptr, image is written
on stdout */
CGAL_INLINE_FUNCTION
int _writeImage(_image *im, const char *name_to_be_written ) {
int r = ImageIO_NO_ERROR;
std::size_t length = 0;
- char *name = NULL;
- char *baseName = NULL;
+ char *name = nullptr;
+ char *baseName = nullptr;
- if ( im == NULL ) return -1;
+ if ( im == nullptr ) return -1;
/* different conventions for the standard input
*/
- if ( name_to_be_written == NULL || name_to_be_written[0] == '\0'
+ if ( name_to_be_written == nullptr || name_to_be_written[0] == '\0'
|| (name_to_be_written[0] == '-' && name_to_be_written[1] == '\0')
|| (name_to_be_written[0] == '>' && name_to_be_written[1] == '\0') ) {
- name = NULL;
+ name = nullptr;
}
else {
name = strdup( name_to_be_written );
@@ -919,7 +919,7 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
/* what is the wanted format
*/
- if ( name == NULL ) {
+ if ( name == nullptr ) {
im->imageFormat = get_static_inrimageFormat();
} else {
std::size_t i,extLength;
@@ -929,10 +929,10 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
/* scan all formats; */
- im->imageFormat=NULL;
+ im->imageFormat=nullptr;
length=strlen(name);
- for(f=get_static_firstFormat();(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
+ for(f=get_static_firstFormat();(f!=nullptr)&& (im->imageFormat==nullptr);f=f->next) {
/* scan all extensions for that format */
ptr=&f->fileExtension[0];
@@ -960,7 +960,7 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
baseName[i]='\0';
}
- } while (((*ptr)!='\0') && (im->imageFormat==NULL));
+ } while (((*ptr)!='\0') && (im->imageFormat==nullptr));
}
if (!im->imageFormat) {
@@ -978,15 +978,15 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
if(!im->fd) {
fprintf(stderr, "_writeImage: error: open failed\n");
- if ( name != NULL ) free( name );
- if ( baseName != NULL ) free( baseName );
+ if ( name != nullptr ) free( name );
+ if ( baseName != nullptr ) free( baseName );
return ImageIO_OPENING;
}
*/
if (im->imageFormat) {
- if (im->imageFormat->writeImage==NULL) {
+ if (im->imageFormat->writeImage==nullptr) {
im->imageFormat=get_static_inrimageFormat();
}
@@ -1008,11 +1008,11 @@ int _writeImage(_image *im, const char *name_to_be_written ) {
/* close file descriptor */
ImageIO_close( im );
- im->fd = NULL;
+ im->fd = nullptr;
im->openMode = OM_CLOSE;
- if ( baseName != NULL ) free( baseName );
- if ( name != NULL ) free( name );
+ if ( baseName != nullptr ) free( baseName );
+ if ( name != nullptr ) free( name );
return r;
}
@@ -1058,7 +1058,7 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
{
_image *im;
char magic[5];
- char *name = NULL;
+ char *name = nullptr;
PTRIMAGE_FORMAT f;
int res;
@@ -1066,10 +1066,10 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
/* open image file */
im = _initImage();
- if ( name_to_be_read == NULL || name_to_be_read[0] == '\0'
+ if ( name_to_be_read == nullptr || name_to_be_read[0] == '\0'
|| (name_to_be_read[0] == '-' && name_to_be_read[1] == '\0')
|| (name_to_be_read[0] == '<' && name_to_be_read[1] == '\0') ) {
- name = NULL;
+ name = nullptr;
}
else {
name = strdup( name_to_be_read );
@@ -1079,15 +1079,15 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
_openReadImage(im, name);
if(!im->fd) {
- if(name == NULL) {
- fprintf(stderr, "_readImageHeaderAndGetError: error: NULL file name\n");
+ if(name == nullptr) {
+ fprintf(stderr, "_readImageHeaderAndGetError: error: nullptr file name\n");
} else {
fprintf(stderr, "_readImageHeaderAndGetError: error: unable to open file \'%s\'\n", name);
}
_freeImage(im);
*error = ImageIO_OPENING;
- if ( name != NULL ) free( name );
- return NULL;
+ if ( name != nullptr ) free( name );
+ return nullptr;
}
initSupportedFileFormat();
@@ -1105,7 +1105,7 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
magic[4] = '\0';
ImageIO_seek(im, 0L, SEEK_SET);
/** test each format */
- for(f=get_static_firstFormat();(f!=NULL)&& (im->imageFormat==NULL);f=f->next) {
+ for(f=get_static_firstFormat();(f!=nullptr)&& (im->imageFormat==nullptr);f=f->next) {
/* test if it is the correct format based on magic and file extension */
if (((*f->testImageFormat)(magic, name)) >=0) {
im->imageFormat=f;
@@ -1113,13 +1113,13 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
}
}
- if ( im->imageFormat == NULL ) {
+ if ( im->imageFormat == nullptr ) {
fprintf(stderr, "_readImageHeaderAndGetError: does not find image format for \'%s\'\n", name);
ImageIO_close( im );
_freeImage(im);
*error = ImageIO_UNKNOWN_TYPE;
- if ( name != NULL ) free( name );
- return NULL;
+ if ( name != nullptr ) free( name );
+ return nullptr;
}
/* now tests if the header can be read correctly */
@@ -1127,19 +1127,19 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
res=(*(im->imageFormat)->readImageHeader)(name,im);
/* could read header only */
if (res == 0) {
- if ( name != NULL ) free( name );
+ if ( name != nullptr ) free( name );
return( im );
}
/* could read header and data */
else if ( res > 0 ) {
ImageIO_close(im);
- if ( name != NULL ) free( name );
+ if ( name != nullptr ) free( name );
return im;
}
/* could not read error : throw error */
fprintf(stderr, "_readImageHeaderAndGetError: an error occurs when reading image\n" );
- if ( name == NULL || im->openMode == OM_STD) {
+ if ( name == nullptr || im->openMode == OM_STD) {
fprintf(stderr, "\t from \'standard input\'" );
}
else {
@@ -1149,8 +1149,8 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error )
ImageIO_close( im );
_freeImage(im);
*error = ImageIO_READING_HEADER;
- if ( name != NULL ) free( name );
- return NULL;
+ if ( name != nullptr ) free( name );
+ return nullptr;
}
@@ -1243,7 +1243,7 @@ static void _swapImageData( _image *im )
/* Read data of an inrimage.
- If im->data is not NULL, assume that the buffer was previously allocated
+ If im->data is not nullptr, assume that the buffer was previously allocated
Swap bytes depending on the endianness and the current architecture */
CGAL_INLINE_FUNCTION
int _readImageData(_image *im) {
@@ -1280,7 +1280,7 @@ int _readImageData(_image *im) {
/* Read data of a vectorial inrimage, making the resulting buffer non-
inerlaced.
- If im->data is not NULL, assume that the buffer was previously allocated
+ If im->data is not nullptr, assume that the buffer was previously allocated
Swap bytes depending on the endianness and the current architecture. */
CGAL_INLINE_FUNCTION
int _readNonInterlacedImageData(_image *im) {
@@ -1472,7 +1472,7 @@ PTRIMAGE_FORMAT imageType(const char *fileName) {
#endif
}
- if(!f) return NULL;
+ if(!f) return nullptr;
#ifdef CGAL_USE_ZLIB
gzread( f, (void *) magic, 4);
@@ -1489,10 +1489,10 @@ PTRIMAGE_FORMAT imageType(const char *fileName) {
if(fileName) fclose( f );
#endif
- if (get_static_firstFormat()==NULL)
+ if (get_static_firstFormat()==nullptr)
initSupportedFileFormat();
- for(format=get_static_firstFormat();(format!=NULL);format=format->next) {
+ for(format=get_static_firstFormat();(format!=nullptr);format=format->next) {
/* test if it is the correct header based on magic and file extension */
if (((*format->testImageFormat)(magic,fileName)) >=0) {
return format;
@@ -1550,13 +1550,13 @@ int addImageFormatAtEnd( PTRIMAGE_FORMAT format)
(strlen(format->fileExtension)>0) &&
(strlen(format->realName)>0) ) {
- format->next = NULL;
+ format->next = nullptr;
- if (get_static_firstFormat() == NULL) {
+ if (get_static_firstFormat() == nullptr) {
get_static_firstFormat()=format;
}
else {
- for(f=get_static_firstFormat();(f->next!=NULL);f=f->next)
+ for(f=get_static_firstFormat();(f->next!=nullptr);f=f->next)
;
f->next=format;
}
@@ -1577,7 +1577,7 @@ CGAL_INLINE_FUNCTION
void initSupportedFileFormat()
{
PTRIMAGE_FORMAT f;
- if ( get_static_inrimageFormat() == NULL ) {
+ if ( get_static_inrimageFormat() == nullptr ) {
f = createAnalyzeFormat();
addImageFormatAtEnd( f );
f = createBMPFormat();
@@ -1616,7 +1616,7 @@ void printSupportedFileFormat() {
initSupportedFileFormat();
- for(i=0, f=get_static_firstFormat();(f!=NULL);i++, f=f->next) {
+ for(i=0, f=get_static_firstFormat();(f!=nullptr);i++, f=f->next) {
if ( (f->testImageFormat) &&
(f->readImageHeader) &&
(strlen(f->fileExtension)>0) &&
@@ -1638,12 +1638,12 @@ CGAL_INLINE_FUNCTION
void removeSupportedFileFormat() {
PTRIMAGE_FORMAT f=get_static_firstFormat();
- while( f != NULL) {
+ while( f != nullptr) {
PTRIMAGE_FORMAT f_old = f;
f = f->next;
ImageIO_free( f_old);
}
- get_static_inrimageFormat()=NULL;
+ get_static_inrimageFormat()=nullptr;
}
@@ -1727,7 +1727,7 @@ void convertImageTypeToFloat(_image* image){
const std::size_t dimz = image->zdim;
float * array = (float*)ImageIO_alloc (dimx * dimy * dimz *sizeof(float));
- if (array == NULL ) {
+ if (array == nullptr ) {
fprintf ( stderr, "allocation error\n" );
return;
}
diff --git a/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h b/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h
index 9b1eeaff285..f7875901b4e 100644
--- a/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h
+++ b/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h
@@ -122,7 +122,7 @@ protected :
// image rotation
_im->rx = _im->ry = _im->rz = 0.0;
- _im->fd = NULL;
+ _im->fd = nullptr;
_im->openMode = OM_CLOSE;
if(string_field("data_format") == "native_float" ||
string_field("data_format") == "\"native_float\"")
@@ -135,7 +135,7 @@ protected :
_im->dataMode = DM_BINARY;
// no user string
- _im->user = NULL;
+ _im->user = nullptr;
_im->nuser = 0;
// word type (unsigned byte)
@@ -143,7 +143,7 @@ protected :
_im->wordKind = WK_FLOAT;
_im->vectMode = VM_SCALAR;
_im->sign = SGN_SIGNED;
- _im->imageFormat = NULL;
+ _im->imageFormat = nullptr;
::_openReadImage(_im, dataFilename.c_str());
if(!_im->fd) return false;
diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h
index 027a83bc6c0..94d844cd645 100644
--- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h
+++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h
@@ -71,7 +71,7 @@ namespace CGAL{
Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
- :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),_page(NULL),_helper(NULL){};
+ :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),_page(nullptr),_helper(nullptr){};
IpePage* get_IpePage() const {return _page;}
@@ -89,7 +89,7 @@ namespace CGAL{
protected_run(i);
}
catch(...){
- helper->MessageBox("Error : Save your page in a file and submit it to \n https://www.cgal.org/bug_report.html","OK",NULL,NULL);
+ helper->MessageBox("Error : Save your page in a file and submit it to \n https://www.cgal.org/bug_report.html","OK",nullptr,nullptr);
}
};
@@ -112,7 +112,7 @@ namespace CGAL{
hmsg=hmsg+"- "+SubLab[i]+": "+HMsg[i]+"
";
else
hmsg=hmsg+"- "+HMsg[0]+"
";
- _helper->MessageBox(&hmsg[0],"OK",NULL,NULL);
+ _helper->MessageBox(&hmsg[0],"OK",nullptr,nullptr);
return;
}
@@ -338,7 +338,7 @@ public:
SSP_ipe->SetClosed(true);
return SSP_ipe;
}
- return NULL;
+ return nullptr;
}
@@ -352,10 +352,10 @@ public:
typename std::iterator_traits::value_type,
Point_2
>
- >::type* =NULL) const
+ >::type* =nullptr) const
{
IpeSegmentSubPath* SSP_ipe=create_polyline(first,last,setclose);
- if (SSP_ipe!=NULL){
+ if (SSP_ipe!=nullptr){
IpePath* obj_ipe = new IpePath(_helper->Attributes());
obj_ipe->AddSubPath(SSP_ipe);
if (blackfill)
@@ -364,7 +364,7 @@ public:
if (deselect_all) (--_page->end())->SetSelect(IpePgObject::ENone);
return obj_ipe;
}
- return NULL;
+ return nullptr;
}
void draw_in_ipe(const Circle_2& C,bool deselect_all=false) const {
@@ -651,7 +651,7 @@ public:
boost::mpl::or_< boost::is_same::value_type,Circular_arc_2> ,
boost::is_same::value_type,Polygon_2>
> > > >
- >::type* = NULL) const
+ >::type* = nullptr) const
{
for (iterator it=begin;it!=end;++it)
draw_in_ipe(*it,bbox);
diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h
index 22ec39cbff4..f9145de5d41 100644
--- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h
+++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h
@@ -107,7 +107,7 @@ namespace CGAL{
Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
- :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),data_(NULL),helper_(NULL){};
+ :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),data_(nullptr),helper_(nullptr){};
ipe::Page* get_IpePage() const {return data_->iPage;}
@@ -127,7 +127,7 @@ namespace CGAL{
return true;
}
catch(...){
- helper->messageBox("Error : Save your page in a file and submit it to \n https://www.cgal.org/bug_report.html",NULL,ipe::IpeletHelper::EOkCancelButtons);
+ helper->messageBox("Error : Save your page in a file and submit it to \n https://www.cgal.org/bug_report.html",nullptr,ipe::IpeletHelper::EOkCancelButtons);
return false;
}
};
@@ -142,7 +142,7 @@ namespace CGAL{
hmsg=hmsg+"- "+SubLab[i]+": "+HMsg[i]+"
";
else
hmsg=hmsg+"- "+HMsg[0]+"
";
- get_IpeletHelper()->messageBox(&hmsg[0],NULL,ipe::IpeletHelper::EOkCancelButtons);
+ get_IpeletHelper()->messageBox(&hmsg[0],nullptr,ipe::IpeletHelper::EOkCancelButtons);
return;
}
@@ -350,7 +350,7 @@ public:
SSP_ipe->setClosed(true);
return SSP_ipe;
}
- return NULL;
+ return nullptr;
}
@@ -364,10 +364,10 @@ public:
typename std::iterator_traits::value_type,
Point_2
>
- >::type* =NULL) const
+ >::type* =nullptr) const
{
ipe::Curve* SSP_ipe=create_polyline(first,last,setclose);
- if (SSP_ipe!=NULL){
+ if (SSP_ipe!=nullptr){
ipe::Shape shape;
shape.appendSubPath(SSP_ipe);
ipe::Path* obj_ipe=new ipe::Path(CURRENTATTRIBUTES,shape);
@@ -378,7 +378,7 @@ public:
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,obj_ipe);
return obj_ipe;
}
- return NULL;
+ return nullptr;
}
void draw_in_ipe(const Circle_2& C,bool deselect_all=false) const {
@@ -660,7 +660,7 @@ public:
boost::mpl::or_< boost::is_same::value_type,Circular_arc_2> ,
boost::is_same::value_type,Polygon_2>
> > > >
- >::type* = NULL) const
+ >::type* = nullptr) const
{
for (iterator it=begin;it!=end;++it)
draw_in_ipe(*it,bbox);
diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Circle_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Circle_3.h
index d2ed2fc5362..15299d4c387 100644
--- a/Cartesian_kernel/include/CGAL/Cartesian/Circle_3.h
+++ b/Cartesian_kernel/include/CGAL/Cartesian/Circle_3.h
@@ -91,11 +91,11 @@ public:
// s1,s2 must intersect
CGAL_kernel_precondition(!(obj.is_empty()));
const typename R::Circle_3* circle_ptr=object_cast(&obj);
- if(circle_ptr!=NULL)
+ if(circle_ptr!=nullptr)
base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
else {
const typename R::Point_3* point=object_cast(&obj);
- CGAL_kernel_precondition(point!=NULL);
+ CGAL_kernel_precondition(point!=nullptr);
CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
}
@@ -108,11 +108,11 @@ public:
// s1,s2 must intersect
CGAL_kernel_precondition(!(obj.is_empty()));
const typename R::Circle_3* circle_ptr=object_cast(&obj);
- if(circle_ptr!=NULL)
+ if(circle_ptr!=nullptr)
base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
else {
const typename R::Point_3* point=object_cast(&obj);
- CGAL_kernel_precondition(point!=NULL);
+ CGAL_kernel_precondition(point!=nullptr);
CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
}
diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h
index a1ee4abbb5c..c8b1d2ec9a3 100644
--- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h
+++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h
@@ -745,49 +745,49 @@ class Filtered_bbox_circular_arc_2_base : public Base_CK::Circular_arc_2
public:
///////////Construction/////////////
- Filtered_bbox_circular_arc_2_base() : P_arc(), bb(NULL) {}
+ Filtered_bbox_circular_arc_2_base() : P_arc(), bb(nullptr) {}
- Filtered_bbox_circular_arc_2_base(const P_arc& arc) : P_arc(arc), bb(NULL) {}
+ Filtered_bbox_circular_arc_2_base(const P_arc& arc) : P_arc(arc), bb(nullptr) {}
// otherwise it will lead to ambiguos definitions
explicit Filtered_bbox_circular_arc_2_base(const Circle_2 &c)
- : P_arc(c),bb(NULL)
+ : P_arc(c),bb(nullptr)
{}
Filtered_bbox_circular_arc_2_base(const Circle_2 &support,
const Line_2 &l1, const bool b_l1,
const Line_2 &l2, const bool b_l2)
- : P_arc(support,l1,b_l1,l2,b_l2),bb(NULL)
+ : P_arc(support,l1,b_l1,l2,b_l2),bb(nullptr)
{}
Filtered_bbox_circular_arc_2_base(const Circle_2 &c,
const Circle_2 &c1, const bool b_1,
const Circle_2 &c2, const bool b_2)
- : P_arc(c,c1,b_1,c2,b_2),bb(NULL)
+ : P_arc(c,c1,b_1,c2,b_2),bb(nullptr)
{}
Filtered_bbox_circular_arc_2_base(const Point_2 &start,
const Point_2 &middle,
const Point_2 &end)
- : P_arc(start, middle, end),bb(NULL)
+ : P_arc(start, middle, end),bb(nullptr)
{}
Filtered_bbox_circular_arc_2_base(const Point_2 &begin,
const Point_2 &end,
const FT &bulge)
- : P_arc(begin, end, bulge),bb(NULL)
+ : P_arc(begin, end, bulge),bb(nullptr)
{}
Filtered_bbox_circular_arc_2_base(const Circle_2 &support,
const Circular_arc_point_2 &begin,
const Circular_arc_point_2 &end)
- : P_arc(support, begin, end),bb(NULL)
+ : P_arc(support, begin, end),bb(nullptr)
{}
Filtered_bbox_circular_arc_2_base(const Self &c)
- : P_arc(c), bb(c.bb ? new Bbox_2(*(c.bb)) : NULL)
+ : P_arc(c), bb(c.bb ? new Bbox_2(*(c.bb)) : nullptr)
{}
Filtered_bbox_circular_arc_2_base& operator=(const Self& c)
@@ -795,10 +795,10 @@ public:
if(this != &c)
{
this->P_arc::operator=(c);
- if (bb != NULL){
+ if (bb != nullptr){
delete bb;
}
- bb = c.bb ? new Bbox_2(*(c.bb)) : NULL;
+ bb = c.bb ? new Bbox_2(*(c.bb)) : nullptr;
}
return *this;
}
@@ -807,7 +807,7 @@ public:
Bbox_2 bbox() const
{
- if(bb==NULL)
+ if(bb==nullptr)
bb=new Bbox_2(CGAL::CircularFunctors::circular_arc_bbox