Remove more const & other minor fixes

This commit is contained in:
Clement Jamin 2016-09-08 16:15:38 +02:00
parent e25f585eb5
commit d3c838e4cd
3 changed files with 52 additions and 52 deletions

View File

@ -454,7 +454,7 @@ p_1, p_2, \ldots, p_d, \infty\}\f$ is returned such that the full cell \f$ (p_1,
on the other side of facet \f$ (p_1, p_2, \ldots, p_d)\f$).
*/
Full_cell_handle locate(const Point & query,
Full_cell_handle hint = Full_cell_handle()) const;
Full_cell_const_handle hint = Full_cell_handle()) const;
/*!
Same as above but `hint` is a vertex and not a full cell.

View File

@ -154,13 +154,13 @@ private:
template < class Dim_tag >
struct get_maximal_dimension
{
static int value(const int D) { return D; }
static int value(int D) { return D; }
};
// specialization
template < int D >
struct get_maximal_dimension<Dimension_tag<D> >
{
static int value(const int) { return D; }
static int value(int) { return D; }
};
public:
@ -208,7 +208,7 @@ public:
protected:
bool check_range(const int i) const
bool check_range(int i) const
{
if( current_dimension() < 0 )
{
@ -242,19 +242,19 @@ public:
Full_cell_container & full_cells() { return full_cells_; }
const Full_cell_container & full_cells() const { return full_cells_; }
Vertex_handle vertex(const Full_cell_handle s, const int i) const /* Concept */
Vertex_handle vertex(Full_cell_handle s, int i) const /* Concept */
{
CGAL_precondition(s != Full_cell_handle() && check_range(i));
return s->vertex(i);
}
Vertex_const_handle vertex(const Full_cell_const_handle s, const int i) const /* Concept */
Vertex_const_handle vertex(Full_cell_const_handle s, int i) const /* Concept */
{
CGAL_precondition(s != Full_cell_handle() && check_range(i));
return s->vertex(i);
}
bool is_vertex(const Vertex_const_handle & v) const /* Concept */
bool is_vertex(Vertex_const_handle v) const /* Concept */
{
if( Vertex_const_handle() == v )
return false;
@ -264,7 +264,7 @@ public:
return v == vit;
}
bool is_full_cell(const Full_cell_const_handle & s) const /* Concept */
bool is_full_cell(Full_cell_const_handle s) const /* Concept */
{
if( Full_cell_const_handle() == s )
return false;
@ -274,43 +274,43 @@ public:
return s == sit;
}
Full_cell_handle full_cell(const Vertex_handle v) const /* Concept */
Full_cell_handle full_cell(Vertex_handle v) const /* Concept */
{
CGAL_precondition(v != Vertex_handle());
return v->full_cell();
}
Full_cell_const_handle full_cell(const Vertex_const_handle v) const /* Concept */
Full_cell_const_handle full_cell(Vertex_const_handle v) const /* Concept */
{
CGAL_precondition(Vertex_const_handle() != v);
return v->full_cell();
}
Full_cell_handle neighbor(const Full_cell_handle s, const int i) const /* Concept */
Full_cell_handle neighbor(Full_cell_handle s, int i) const /* Concept */
{
CGAL_precondition(Full_cell_handle() != s && check_range(i));
return s->neighbor(i);
}
Full_cell_const_handle neighbor(const Full_cell_const_handle s, const int i) const/* Concept */
Full_cell_const_handle neighbor(Full_cell_const_handle s, int i) const/* Concept */
{
CGAL_precondition(Full_cell_const_handle() != s && check_range(i));
return s->neighbor(i);
}
int mirror_index(const Full_cell_handle s, const int i) const /* Concept */
int mirror_index(Full_cell_handle s, int i) const /* Concept */
{
CGAL_precondition(Full_cell_handle() != s && check_range(i));
return s->mirror_index(i);
}
int mirror_index(const Full_cell_const_handle s, const int i) const
int mirror_index(Full_cell_const_handle s, int i) const
{
CGAL_precondition(Full_cell_const_handle() != s && check_range(i)); /* Concept */
return s->mirror_index(i);
}
int mirror_vertex(const Full_cell_handle s, const int i) const /* Concept */
int mirror_vertex(Full_cell_handle s, int i) const /* Concept */
{
CGAL_precondition(Full_cell_handle() != s && check_range(i));
return s->mirror_vertex(i);
@ -365,7 +365,7 @@ public:
// NICE UPDATE OPERATIONS
protected:
void do_insert_increase_dimension(const Vertex_handle, const Vertex_handle);
void do_insert_increase_dimension(Vertex_handle, Vertex_handle);
public:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - REMOVALS
@ -378,9 +378,9 @@ public:
Vertex_handle insert_in_face(const Face &); /* Concept */
Vertex_handle insert_in_facet(const Facet &); /* Concept */
template< typename Forward_iterator >
Vertex_handle insert_in_hole(Forward_iterator, const Forward_iterator, Facet); /* Concept */
Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, Facet); /* Concept */
template< typename Forward_iterator, typename OutputIterator >
Vertex_handle insert_in_hole(Forward_iterator, const Forward_iterator, Facet, OutputIterator); /* Concept */
Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, Facet, OutputIterator); /* Concept */
template< typename OutputIterator >
Full_cell_handle insert_in_tagged_hole(Vertex_handle, Facet, OutputIterator);
@ -445,13 +445,13 @@ public:
dcur_ = -2;
}
void set_current_dimension(const int d) /* Concept */
void set_current_dimension(int d) /* Concept */
{
CGAL_precondition(-2<=d && d<=maximal_dimension());
dcur_ = d;
}
Full_cell_handle new_full_cell(const Full_cell_handle s)
Full_cell_handle new_full_cell(Full_cell_handle s)
{
return full_cells_.emplace(*s);
}
@ -493,7 +493,7 @@ public:
vertices_.erase(v);
}
void associate_vertex_with_full_cell(Full_cell_handle s, const int i, Vertex_handle v) /* Concept */
void associate_vertex_with_full_cell(Full_cell_handle s, int i, Vertex_handle v) /* Concept */
{
CGAL_precondition(check_range(i));
CGAL_precondition(s != Full_cell_handle());
@ -606,27 +606,27 @@ public:
OutputIterator star(const Face &, OutputIterator) const; /* Concept */
#ifndef CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES
template< typename OutputIterator, typename Comparator = std::less<Vertex_const_handle> >
OutputIterator incident_upper_faces(Vertex_const_handle v, const int dim, OutputIterator out, Comparator cmp = Comparator())
OutputIterator incident_upper_faces(Vertex_const_handle v, int dim, OutputIterator out, Comparator cmp = Comparator())
{
return incident_faces(v, dim, out, cmp, true);
}
template< typename OutputIterator, typename Comparator = std::less<Vertex_const_handle> >
OutputIterator incident_faces(Vertex_const_handle, const int, OutputIterator, Comparator = Comparator(), bool = false) const;
OutputIterator incident_faces(Vertex_const_handle, int, OutputIterator, Comparator = Comparator(), bool = false) const;
#else
template< typename OutputIterator, typename Comparator >
OutputIterator incident_upper_faces(Vertex_const_handle v, const int dim, OutputIterator out, Comparator cmp = Comparator())
OutputIterator incident_upper_faces(Vertex_const_handle v, int dim, OutputIterator out, Comparator cmp = Comparator())
{
return incident_faces(v, dim, out, cmp, true);
}
template< typename OutputIterator >
OutputIterator incident_upper_faces(Vertex_const_handle v, const int dim, OutputIterator out)
OutputIterator incident_upper_faces(Vertex_const_handle v, int dim, OutputIterator out)
{
return incident_faces(v, dim, out, std::less<Vertex_const_handle>(), true);
}
template< typename OutputIterator, typename Comparator >
OutputIterator incident_faces(Vertex_const_handle, const int, OutputIterator, Comparator = Comparator(), bool = false) const;
OutputIterator incident_faces(Vertex_const_handle, int, OutputIterator, Comparator = Comparator(), bool = false) const;
template< typename OutputIterator >
OutputIterator incident_faces(Vertex_const_handle, const int, OutputIterator,
OutputIterator incident_faces(Vertex_const_handle, int, OutputIterator,
std::less<Vertex_const_handle> = std::less<Vertex_const_handle>(), bool = false) const;
#endif
@ -722,7 +722,7 @@ template< class Dim, class Vb, class Fcb >
template< typename OutputIterator >
OutputIterator
Triangulation_data_structure<Dim, Vb, Fcb>
::incident_faces(Vertex_const_handle v, const int dim, OutputIterator out,
::incident_faces(Vertex_const_handle v, int dim, OutputIterator out,
std::less<Vertex_const_handle> cmp, bool upper_faces) const
{
return incident_faces<OutputIterator, std::less<Vertex_const_handle> >(v, dim, out, cmp, upper_faces);
@ -733,7 +733,7 @@ template< class Dim, class Vb, class Fcb >
template< typename OutputIterator, typename Comparator >
OutputIterator
Triangulation_data_structure<Dim, Vb, Fcb>
::incident_faces(Vertex_const_handle v, const int dim, OutputIterator out, Comparator cmp, bool upper_faces) const
::incident_faces(Vertex_const_handle v, int dim, OutputIterator out, Comparator cmp, bool upper_faces) const
{
CGAL_precondition( 0 < dim );
if( dim >= current_dimension() )
@ -1115,7 +1115,7 @@ Triangulation_data_structure<Dim, Vb, Fcb>
template <class Dim, class Vb, class Fcb>
void Triangulation_data_structure<Dim, Vb, Fcb>
::do_insert_increase_dimension(const Vertex_handle x, const Vertex_handle star)
::do_insert_increase_dimension(Vertex_handle x, Vertex_handle star)
{
Full_cell_handle start = full_cells_begin();
Full_cell_handle swap_me;