mirror of https://github.com/CGAL/cgal
Reserve hashtable size in polygon_mesh_to_nef_3
This commit is contained in:
parent
7aa98b48bc
commit
aa9e7cf34d
|
|
@ -545,6 +545,8 @@ class SNC_simplify_base : public SNC_decorator<SNC_structure> {
|
|||
Unique_hash_map< SFace_handle, UFH_sface>& hash,
|
||||
Union_find< SFace_handle>& uf ) {
|
||||
Unique_hash_map< SHalfedge_handle, bool> linked(false, this->sncp()->number_of_shalfedges());
|
||||
this->sncp()->reserve_sm_boundary_items(this->sncp()->number_of_sfaces());
|
||||
|
||||
SNC_decorator D(*this->sncp());
|
||||
SHalfedge_iterator e;
|
||||
CGAL_forall_shalfedges(e, *this->sncp()) {
|
||||
|
|
|
|||
|
|
@ -462,6 +462,10 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
void reserve_sm_boundary_items(Size_type n) {
|
||||
sm_boundary_item_.reserve(n);
|
||||
}
|
||||
|
||||
void clear_boundary() {
|
||||
boundary_item_.clear(boost::none);
|
||||
sm_boundary_item_.clear(boost::none);
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ void polygon_mesh_to_nef_3(PolygonMesh& P, SNC_structure& S, FaceIndexMap fimap,
|
|||
Face_graph_index_adder<typename SNC_structure::Items,
|
||||
PolygonMesh, SNC_structure,HalfedgeIndexMap> index_adder(P,himap);
|
||||
|
||||
|
||||
S.reserve_sm_boundary_items(num_vertices(P));
|
||||
for(vertex_descriptor pv : vertices(P) ) {
|
||||
|
||||
typename boost::property_traits<PMap>::reference npv = get(pmap,pv);
|
||||
|
|
|
|||
Loading…
Reference in New Issue