diff --git a/Nef_3/include/CGAL/Nef_3/SNC_decorator.h b/Nef_3/include/CGAL/Nef_3/SNC_decorator.h index f03780a1fa6..61dcbb983ef 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_decorator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_decorator.h @@ -280,6 +280,7 @@ class SNC_decorator : public SNC_const_decorator { SFace_map linked; Shell_volume_setter(const SNCD_& Di) : D(Di), linked(false) {} + void reserve(Size_type n) { linked.reserve(n); } void visit(SFace_handle h) { CGAL_NEF_TRACEN(h->center_vertex()->point()); D.set_volume(h, c); diff --git a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h index 9e258323e5a..6518d75cc3c 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h @@ -651,6 +651,7 @@ class SNC_simplify_base : public SNC_decorator { SNC_decorator D(*this->sncp()); Volume_setter setter(D); + setter.reserve(this->sncp()->number_of_sfaces()); SFace_iterator sf; Volume_handle c;