Rename to avoid conflict with STL

This commit is contained in:
Mael Rouxel-Labbé 2023-05-16 14:21:27 +02:00
parent 7a2e5412e9
commit a69a2f54c6
8 changed files with 18 additions and 18 deletions

View File

@ -657,7 +657,7 @@ public:
std::cout << "> Extract possibly non-manifold wrap... ()" << std::endl; std::cout << "> Extract possibly non-manifold wrap... ()" << std::endl;
#endif #endif
empty(output_mesh); remove_all_elements(output_mesh);
CGAL_assertion_code(for(auto cit=m_dt.finite_cells_begin(), cend=m_dt.finite_cells_end(); cit!=cend; ++cit)) CGAL_assertion_code(for(auto cit=m_dt.finite_cells_begin(), cend=m_dt.finite_cells_end(); cit!=cend; ++cit))
CGAL_assertion(cit->tds_data().is_clear()); CGAL_assertion(cit->tds_data().is_clear());
@ -745,7 +745,7 @@ public:
CGAL_assertion_code(for(Vertex_handle v : m_dt.finite_vertex_handles())) CGAL_assertion_code(for(Vertex_handle v : m_dt.finite_vertex_handles()))
CGAL_assertion(!is_non_manifold(v)); CGAL_assertion(!is_non_manifold(v));
empty(output_mesh); remove_all_elements(output_mesh);
// boundary faces to polygon soup // boundary faces to polygon soup
std::vector<Point_3> points; std::vector<Point_3> points;

View File

@ -679,7 +679,7 @@ user might encounter.
- `CGAL::make_grid()` - `CGAL::make_grid()`
- `CGAL::clear()` - `CGAL::clear()`
- `CGAL::empty()` - `CGAL::remove_all_elements()`
- `CGAL::copy_face_graph()` - `CGAL::copy_face_graph()`
- `CGAL::set_triangulation_ids()` - `CGAL::set_triangulation_ids()`

View File

@ -950,12 +950,12 @@ void swap_edges(const typename boost::graph_traits<FaceGraph>::halfedge_descript
* *
* @tparam FaceGraph model of `MutableHalfedgeGraph` and `MutableFaceGraph` * @tparam FaceGraph model of `MutableHalfedgeGraph` and `MutableFaceGraph`
* *
* @param g the graph to empty * @param g the graph whose elements will be removed
* *
* @sa `CGAL::clear()` * @sa `CGAL::clear()`
**/ **/
template<typename FaceGraph> template<typename FaceGraph>
void empty(FaceGraph& g) void remove_all_elements(FaceGraph& g)
{ {
while(std::begin(edges(g)) != std::end(edges(g))) while(std::begin(edges(g)) != std::end(edges(g)))
remove_edge(*std::begin(edges(g)), g); remove_edge(*std::begin(edges(g)), g);
@ -984,7 +984,7 @@ inline
std::enable_if_t<!Has_member_clear<FaceGraph>::value, void> std::enable_if_t<!Has_member_clear<FaceGraph>::value, void>
clear_impl(FaceGraph& g) clear_impl(FaceGraph& g)
{ {
empty(g); remove_all_elements(g);
} }
} // namespace internal } // namespace internal
@ -1008,7 +1008,7 @@ clear_impl(FaceGraph& g)
* *
* @param g the graph to clear * @param g the graph to clear
* *
* @sa `CGAL::empty()` * @sa `CGAL::remove_all_elements()`
**/ **/
template<typename FaceGraph> template<typename FaceGraph>
void clear(FaceGraph& g) void clear(FaceGraph& g)

View File

@ -738,7 +738,7 @@ bool clip(TriangleMesh& tm,
case ON_NEGATIVE_SIDE: case ON_NEGATIVE_SIDE:
return true; // nothing to clip, the full mesh is on the negative side return true; // nothing to clip, the full mesh is on the negative side
case ON_POSITIVE_SIDE: case ON_POSITIVE_SIDE:
empty(tm); // clear the mesh that is fully on the positive side remove_all_elements(tm); // clear the mesh that is fully on the positive side
return true; return true;
default: default:
break; break;

View File

@ -423,7 +423,7 @@ std::size_t keep_largest_connected_components(PolygonMesh& pmesh,
if(nb_components_to_keep == 0) if(nb_components_to_keep == 0)
{ {
empty(pmesh); remove_all_elements(pmesh);
return num; return num;
} }

View File

@ -266,11 +266,11 @@ corefine_and_compute_boolean_operations(
if (output[Corefinement::TM1_MINUS_TM2] != boost::none) if (output[Corefinement::TM1_MINUS_TM2] != boost::none)
if (&tm1 == *output[Corefinement::TM1_MINUS_TM2]) if (&tm1 == *output[Corefinement::TM1_MINUS_TM2])
empty(tm1); remove_all_elements(tm1);
if (output[Corefinement::TM2_MINUS_TM1] != boost::none) if (output[Corefinement::TM2_MINUS_TM1] != boost::none)
if (&tm1 == *output[Corefinement::TM2_MINUS_TM1]) if (&tm1 == *output[Corefinement::TM2_MINUS_TM1])
empty(tm1); remove_all_elements(tm1);
return CGAL::make_array(true, true, true, true); return CGAL::make_array(true, true, true, true);
} }
@ -282,7 +282,7 @@ corefine_and_compute_boolean_operations(
{ {
for (int i=0; i<4; ++i) for (int i=0; i<4; ++i)
if (output[i] != boost::none) if (output[i] != boost::none)
empty(*(*output[i])); remove_all_elements(*(*output[i]));
return CGAL::make_array(true, true, true, true); return CGAL::make_array(true, true, true, true);
} }
// tm2 is not empty // tm2 is not empty
@ -293,9 +293,9 @@ corefine_and_compute_boolean_operations(
parameters::vertex_point_map(vpm2), parameters::vertex_point_map(vpm2),
parameters::vertex_point_map(*std::get<Corefinement::UNION>(vpm_out_tuple))); parameters::vertex_point_map(*std::get<Corefinement::UNION>(vpm_out_tuple)));
if (output[Corefinement::INTERSECTION] != boost::none) if (output[Corefinement::INTERSECTION] != boost::none)
empty(*(*output[Corefinement::INTERSECTION])); remove_all_elements(*(*output[Corefinement::INTERSECTION]));
if (output[Corefinement::TM1_MINUS_TM2] != boost::none) if (output[Corefinement::TM1_MINUS_TM2] != boost::none)
empty(*(*output[Corefinement::TM1_MINUS_TM2])); remove_all_elements(*(*output[Corefinement::TM1_MINUS_TM2]));
if (output[Corefinement::TM2_MINUS_TM1] != boost::none) if (output[Corefinement::TM2_MINUS_TM1] != boost::none)
if (&tm2 != *output[Corefinement::TM2_MINUS_TM1]) if (&tm2 != *output[Corefinement::TM2_MINUS_TM1])
copy_face_graph(tm2, copy_face_graph(tm2,
@ -315,9 +315,9 @@ corefine_and_compute_boolean_operations(
parameters::vertex_point_map(vpm1), parameters::vertex_point_map(vpm1),
parameters::vertex_point_map(*std::get<Corefinement::UNION>(vpm_out_tuple))); parameters::vertex_point_map(*std::get<Corefinement::UNION>(vpm_out_tuple)));
if (output[Corefinement::INTERSECTION] != boost::none) if (output[Corefinement::INTERSECTION] != boost::none)
empty(*(*output[Corefinement::INTERSECTION])); remove_all_elements(*(*output[Corefinement::INTERSECTION]));
if (output[Corefinement::TM2_MINUS_TM1] != boost::none) if (output[Corefinement::TM2_MINUS_TM1] != boost::none)
empty(*(*output[Corefinement::TM2_MINUS_TM1])); remove_all_elements(*(*output[Corefinement::TM2_MINUS_TM1]));
if (output[Corefinement::TM1_MINUS_TM2] != boost::none) if (output[Corefinement::TM1_MINUS_TM2] != boost::none)
if (&tm1 != *output[Corefinement::TM1_MINUS_TM2]) if (&tm1 != *output[Corefinement::TM1_MINUS_TM2])
copy_face_graph(tm1, copy_face_graph(tm1,

View File

@ -1265,7 +1265,7 @@ bool decimate_meshes_with_common_interfaces_impl(TriangleMeshRange& meshes,
} }
CGAL_assertion(is_polygon_soup_a_polygon_mesh(all_faces[mesh_id])); CGAL_assertion(is_polygon_soup_a_polygon_mesh(all_faces[mesh_id]));
empty(tm); remove_all_elements(tm);
polygon_soup_to_polygon_mesh(all_corners[mesh_id], all_faces[mesh_id], polygon_soup_to_polygon_mesh(all_corners[mesh_id], all_faces[mesh_id],
tm, parameters::default_values(), parameters::vertex_point_map(vpms[mesh_id])); tm, parameters::default_values(), parameters::vertex_point_map(vpms[mesh_id]));
} }

View File

@ -1934,7 +1934,7 @@ bool remove_degenerate_faces(const FaceRange& face_range,
if(degenerate_face_set.size() == faces_size) if(degenerate_face_set.size() == faces_size)
{ {
empty(tmesh); remove_all_elements(tmesh);
return true; return true;
} }