pmp, range loop analysis fixed warnings

This commit is contained in:
Dmitry Anisimov 2021-06-02 16:17:16 +02:00
parent 7f83449fa5
commit 4d2931cee8
7 changed files with 20 additions and 20 deletions

View File

@ -1017,7 +1017,7 @@ std::size_t snap_non_conformal(HalfedgeRange& halfedge_range_A,
Vertex_patch vertex_patch_map_A = get(Vertex_size_t_tag(), tm_A);
Vertex_patch vertex_patch_map_B = get(Vertex_size_t_tag(), tm_B);
for(const halfedge_descriptor h : halfedge_range_A)
for(const halfedge_descriptor& h : halfedge_range_A)
{
CGAL_precondition(is_border(h, tm_A));
halfedge_descriptor h_opp = opposite(h, tm_A);
@ -1026,7 +1026,7 @@ std::size_t snap_non_conformal(HalfedgeRange& halfedge_range_A,
}
// @todo avoid that when 'self_snapping' is true
for(const halfedge_descriptor h : halfedge_range_B)
for(const halfedge_descriptor& h : halfedge_range_B)
{
CGAL_precondition(is_border(h, tm_B));
halfedge_descriptor h_opp = opposite(h, tm_B);
@ -1111,16 +1111,16 @@ std::size_t snap_non_conformal(HalfedgeRange& halfedge_range_A,
}
}
for(const halfedge_descriptor h : locked_halfedges_A_vector)
for(const halfedge_descriptor& h : locked_halfedges_A_vector)
put(locked_halfedges_A, h, true);
for(const halfedge_descriptor h : locked_halfedges_B_vector)
for(const halfedge_descriptor& h : locked_halfedges_B_vector)
put(locked_halfedges_B, h, true);
if(is_same_mesh)
{
for(const halfedge_descriptor h : locked_halfedges_A_vector)
for(const halfedge_descriptor& h : locked_halfedges_A_vector)
put(locked_halfedges_B, h, true);
for(const halfedge_descriptor h : locked_halfedges_B_vector)
for(const halfedge_descriptor& h : locked_halfedges_B_vector)
put(locked_halfedges_A, h, true);
}

View File

@ -589,7 +589,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A,
{
if(is_second_mesh_fixed)
{
for(const halfedge_descriptor ha : vs_a)
for(const halfedge_descriptor& ha : vs_a)
put(vpm_A, target(ha, tm_A), get(vpm_B, vb));
}
else
@ -605,10 +605,10 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A,
std::cout << "new position of " << va << " " << vb << " --> " << new_p << std::endl;
#endif
for(const halfedge_descriptor ha : vs_a)
for(const halfedge_descriptor& ha : vs_a)
put(vpm_A, target(ha, tm_A), new_p);
for(const halfedge_descriptor hb : vs_b)
for(const halfedge_descriptor& hb : vs_b)
put(vpm_B, target(hb, tm_B), new_p);
}
@ -650,9 +650,9 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A,
// Quadratic, but all halfedges in vs_a and vs_b point to the same point. There shouldn't be many.
// @fixme this assumes compatible orientation...
for(const halfedge_descriptor ha : vs_a)
for(const halfedge_descriptor& ha : vs_a)
{
for(const halfedge_descriptor hb : vs_b)
for(const halfedge_descriptor& hb : vs_b)
{
if(!is_border(ha, tm_A) || !is_border(hb, tm_B))
continue;

View File

@ -499,7 +499,7 @@ void copy_container_content(
RefToContainer ref_wrapper)
{
ref_wrapper.get().reserve(vec.size());
for(const T& t : vec)
for(const T t : vec)
{
ref_wrapper.get().push_back(t);
}

View File

@ -95,13 +95,13 @@ void polygon_mesh_to_polygon_soup(const PolygonMesh& mesh,
CGAL::internal::reserve(points, points.size() + vertices(mesh).size());
CGAL::internal::reserve(polygons, polygons.size() + faces(mesh).size());
for(const vertex_descriptor v : vertices(mesh))
for(const vertex_descriptor& v : vertices(mesh))
{
points.emplace_back(get(vpm, v));
put(vim, v, index++);
}
for(const face_descriptor f : faces(mesh))
for(const face_descriptor& f : faces(mesh))
{
CGAL::Iterator_range<CGAL::Halfedge_around_face_iterator<PolygonMesh> > incident_halfedges =
CGAL::halfedges_around_face(halfedge(f, mesh), mesh);

View File

@ -1570,7 +1570,7 @@ remove_self_intersections_one_step(std::set<typename boost::graph_traits<Triangl
std::cout << " DEBUG: No self-intersection in CC\n";
#endif
for(const face_descriptor f : cc_faces)
for(const face_descriptor& f : cc_faces)
faces_to_remove.erase(f);
continue;

View File

@ -184,7 +184,7 @@ public:
std::vector<halfedge_descriptor> halfedges_to_consider() const
{
std::vector<halfedge_descriptor> boundaries;
for(const halfedge_descriptor bh : m_cycle_reps)
for(const halfedge_descriptor& bh : m_cycle_reps)
for(halfedge_descriptor h : CGAL::halfedges_around_face(bh, m_pmesh))
boundaries.push_back(h);
@ -222,7 +222,7 @@ public:
CGAL_assertion(!cycle_halfedges.empty());
for(const halfedge_descriptor h : cycle_halfedges)
for(const halfedge_descriptor& h : cycle_halfedges)
put(m_candidate_halfedges, h, true);
for(const halfedges_pair& hp : filtered_stitchable_halfedges)
@ -231,7 +231,7 @@ public:
put(m_candidate_halfedges, hp.second, false);
}
for(const halfedge_descriptor h : cycle_halfedges)
for(const halfedge_descriptor& h : cycle_halfedges)
{
if(!is_border(h, m_pmesh) || !get(m_candidate_halfedges, h))
continue;
@ -1147,7 +1147,7 @@ std::size_t stitch_boundary_cycles(const BorderHalfedgeRange& boundary_cycle_rep
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
std::size_t stitched_boundary_cycles_n = 0;
for(const halfedge_descriptor h : boundary_cycle_representatives)
for(const halfedge_descriptor& h : boundary_cycle_representatives)
stitched_boundary_cycles_n += stitch_boundary_cycle(h, pmesh, cycle_reps_maintainer, np);
return stitched_boundary_cycles_n;

View File

@ -555,7 +555,7 @@ public:
// Filter coplanar edges: we consider only coplanar edges incident to one non-coplanar facet
// for each such edge, add the corresponding nodes in the adjacency-list graph as well as
// the edge
for(const edge_descriptor ed : all_coplanar_edges)
for(const edge_descriptor& ed : all_coplanar_edges)
{
if ( face(halfedge(ed, m_tmesh), m_tmesh)==graph_traits::null_face() ||
opposite_face(ed)==graph_traits::null_face() ||