diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/helper.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/helper.h index 6fe275ca5a2..5f6d85f7f8a 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/helper.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/helper.h @@ -27,7 +27,6 @@ #include #include -typedef CGAL::Exact_predicates_inexact_constructions_kernel K; namespace CGAL { namespace Optimal_bounding_box { @@ -67,10 +66,11 @@ void sm_to_matrix(SurfaceMesh& sm, Matrix& mat) } template -double calculate_volume(std::vector points) +double calculate_volume(const std::vector& points) { - CGAL::Bbox_3 bbox; - bbox = bbox_3(points.begin(), points.end()); + typedef CGAL::Exact_predicates_inexact_constructions_kernel K; + + CGAL::Bbox_3 bbox = bbox_3(points.begin(), points.end()); K::Iso_cuboid_3 ic(bbox); return ic.volume(); }