Address -Wunused-but-set-variable

This commit is contained in:
Andreas Fabri 2022-10-11 07:45:45 +01:00
parent 34d8e5cd5d
commit c352a9cd28
9 changed files with 13 additions and 24 deletions

View File

@ -795,8 +795,7 @@ public:
Assert_compile_time_tag(Supports_vertex_halfedge(), Tag_true());
Assert_compile_time_tag(Supports_halfedge_vertex(), Tag_true());
unsigned int nb_erased_components = 0,
nb_isolated_vertices = 0;
unsigned int nb_erased_components = 0;
// Gets list of connected components, ordered by size (i.e. number of vertices)
std::vector<Vertex_handle> components;
@ -818,13 +817,9 @@ public:
else // if isolated vertex
{
vertices_erase(vertex);
nb_isolated_vertices++;
}
}
// if (nb_isolated_vertices > 0)
// std::cerr << " Erased " << nb_isolated_vertices << " isolated vertices\n";
return nb_erased_components;
}

View File

@ -266,7 +266,6 @@ public:
// Construct the segments of the convolution cycles.
unsigned int curr_id = 0;
unsigned int cycles = 0;
Segments_list conv_segments;
Segments_list cycle;
Labels_set used_labels;
@ -340,7 +339,6 @@ public:
CGAL_assertion(cycle.empty());
}
}
++cycles;
}
curr1 = next1;

View File

@ -485,6 +485,8 @@ check_integrity_and_topological_planarity(bool faces) const
std::size_t e_num = number_of_edges();
std::size_t c_num = number_of_connected_components() - iso_vert_num;
std::size_t f_num = number_of_face_cycles() - c_num + 1;
CGAL_USE(fc_num);
CGAL_USE(iv_num);
CGAL_USE(v_num);
CGAL_USE(e_num);
CGAL_USE(f_num);

View File

@ -17,6 +17,7 @@
#include <CGAL/basic.h>
#include <CGAL/Unique_hash_map.h>
#include <CGAL/use.h>
#include <CGAL/Nef_2/Constrained_triang_traits.h>
#include <CGAL/Nef_2/Object_handle.h>
#include <CGAL/Circulator_project.h>
@ -665,6 +666,7 @@ protected:
}
CGAL_USE(flip_count);
CGAL_NEF_TRACEN(" flipped "<<flip_count);
}

View File

@ -358,6 +358,8 @@ check_integrity_and_topological_planarity(bool faces) const
iso_vert_num
+ number_of_sloops());
CGAL_assertion_code(std::size_t f_num = number_of_sface_cycles() - c_num + 1);
CGAL_USE(fc_num);
CGAL_USE(iv_num);
CGAL_assertion_code(CGAL_NEF_TRACEV(fc_num));
CGAL_assertion_code(CGAL_NEF_TRACEV(iv_num));
CGAL_assertion_code(CGAL_NEF_TRACEV(iso_vert_num));

View File

@ -2180,12 +2180,10 @@ Gt, Tds >::insert_first(const Point& p)
CGAL_triangulation_assertion(_too_long_edge_counter == 0);
// Insert all vertices as the first vertex in the _too_long_edges list
int k = 0;
std::list<Vertex_handle> empty_list;
for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit)
{
_too_long_edges[vit] = empty_list;
k++;
}
// Insert all edges as all edges are too long
@ -3466,11 +3464,9 @@ void Periodic_2_triangulation_2<Gt, Tds>::convert_to_9_sheeted_covering()
_cover = make_array(3, 3);
// Set up too long edges data structure
int i = 0;
for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit)
{
_too_long_edges[vit] = std::list<Vertex_handle>();
++i;
}
_too_long_edge_counter = find_too_long_edges(_too_long_edges);
@ -4434,12 +4430,10 @@ Periodic_2_triangulation_2<Gt, Tds>::load(std::istream& is)
for (std::size_t j = 0 ; j < m; j++)
is >> *(F[j]);
int i = 0;
for (Vertex_iterator vi = vertices_begin();
vi != vertices_end(); ++vi)
{
_too_long_edges[vi] = std::list<Vertex_handle>();
++i;
}
_edge_length_threshold = FT(0.166) * (_domain.xmax() - _domain.xmin())

View File

@ -165,15 +165,11 @@ public:
spatial_sort(points.begin(), points.end(), geom_traits());
Face_handle f;
int cnt = 0;
int cnt_good = 0;
for(typename std::vector<Point>::const_iterator p=points.begin(), end = points.end(); p != end; ++p)
{
++cnt;
Vertex_handle v = insert(*p, f);
if(v != Vertex_handle())
{
++cnt_good;
f = v->face();
}
}
@ -596,8 +592,6 @@ remove(Vertex_handle v)
Nbr_history failsafe;
int internb = 0;
int bdrynb = 0;
for(std::size_t i=0; i<new_f.size(); ++i)
{
for(int k=0; k< 3; k++)
@ -623,7 +617,6 @@ remove(Vertex_handle v)
failsafe.push_back(hist);
tds().set_adjacency(nbf, nbidx, new_f[i], k);
bdrynb++;
break;
}
}
@ -641,7 +634,6 @@ remove(Vertex_handle v)
new_f[i]->vertex(cw(k)) == new_f[l]->vertex(ccw(j)))
{
tds().set_adjacency(new_f[i], k, new_f[l], j);
internb++;
break;
}
}

View File

@ -107,15 +107,17 @@ namespace CGAL {
{
#ifdef CGAL_SURFACE_MESHER_VERBOSE
std::cerr << "scanning vertices" << std::endl;
#endif
int n = 0;
#endif
for (Finite_vertices_iterator vit = SMMBB::tr.finite_vertices_begin();
vit != SMMBB::tr.finite_vertices_end();
++vit) {
if ( (SMMBB::c2t3.face_status(vit) // @TODO: appeler is_regular
== C2t3::SINGULAR) ) {
bad_vertices.insert( vit );
#ifdef CGAL_SURFACE_MESHER_VERBOSE
++n;
#endif
}
}
bad_vertices_initialized = true;

View File

@ -213,8 +213,8 @@ namespace CGAL {
if(withBoundary)
std::cerr << "(boundaries allowed)";
std::cerr << "...\n";
#endif
int n = 0;
#endif
for (Finite_edges_iterator eit = SMB::tr.finite_edges_begin(); eit !=
SMB::tr.finite_edges_end(); ++eit) {
if ( (SMB::c2t3.face_status(*eit)
@ -223,7 +223,9 @@ namespace CGAL {
(SMB::c2t3.face_status(*eit)
== C2t3::BOUNDARY) ) ) {
bad_edges.insert( edge_to_edgevv(*eit) );
#ifdef CGAL_SURFACE_MESHER_VERBOSE
++n;
#endif
}
}
bad_edges_initialized = true;