From 6fd928def0cbb1e8de81e178da9a1d0b65447b2f Mon Sep 17 00:00:00 2001 From: Konstantinos Katrioplas Date: Mon, 11 Jun 2018 14:31:38 +0200 Subject: [PATCH] added forgotten const qualifiers --- .../include/CGAL/Optimal_bounding_box/helper.h | 2 +- .../Optimal_bounding_box/nelder_mead_functions.h | 1 + .../include/CGAL/Optimal_bounding_box/obb.h | 13 ++++++------- .../test_linear_algebra_functions.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) 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 f5d695c78c4..febf283f5a3 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/helper.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/helper.h @@ -33,7 +33,7 @@ namespace Optimal_bounding_box { template -void fill_matrix(std::vector& v_points, Matrix& points_mat) +void fill_matrix(const std::vector& v_points, Matrix& points_mat) { points_mat.resize(v_points.size(), 3); for(std::size_t i = 0; i < v_points.size(); ++i) diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/nelder_mead_functions.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/nelder_mead_functions.h index b22b75c53e0..06a050ffa87 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/nelder_mead_functions.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/nelder_mead_functions.h @@ -22,6 +22,7 @@ #ifndef CGAL_OPTIMAL_BOUNDING_BOX_NEALDER_MEAD_FUNCTIONS_H #define CGAL_OPTIMAL_BOUNDING_BOX_NEALDER_MEAD_FUNCTIONS_H +#include namespace CGAL { namespace Optimal_bounding_box { diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/obb.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/obb.h index 8bd6785ce4f..ff84909f594 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/obb.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/obb.h @@ -100,7 +100,7 @@ void post_processing(const Matrix& points, Vertex& R, Matrix& obb) /// @param use_ch a bool flag to indicating whether to use the convex hull of the input points /// as an optimization step. template -void find_obb(std::vector& points, +void find_obb(const std::vector& points, std::vector& obb_points, LinearAlgebraTraits&, bool use_ch) @@ -164,7 +164,7 @@ void find_obb(std::vector& points, std::cout << "get best: " << timer.time() << std::endl; #endif - MatrixXd obb; // could be preallocated at compile time + MatrixXd obb; // may be preallocated at compile time obb.resize(8, 3); #ifdef OBB_BENCHMARKS @@ -188,7 +188,7 @@ void find_obb(std::vector& points, } template -void find_obb(std::vector& points, +void find_obb(const std::vector& points, std::vector& obb_points, bool use_ch) { @@ -200,7 +200,6 @@ void find_obb(std::vector& points, Linear_algebra_traits la_traits; find_obb(points, obb_points, la_traits, use_ch); - } /// \ingroup OBB_grp @@ -216,7 +215,7 @@ void find_obb(std::vector& points, /// @param use_ch a bool flag to indicating whether to use the convex hull of the input points /// as an optimization step. template -void find_obb(PolygonMesh& pmesh, +void find_obb(const PolygonMesh& pmesh, PolygonMesh& obbmesh, LinearAlgebraTraits& la_traits, bool use_ch) @@ -232,13 +231,13 @@ void find_obb(PolygonMesh& pmesh, typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::property_map::type Vpm; typedef typename boost::property_traits::value_type Point; - //typedef typename Kernel_traits::Kernel Kernel; std::vector points; Vpm pmap = get(boost::vertex_point, pmesh); BOOST_FOREACH(vertex_descriptor v, vertices(pmesh)) points.push_back(get(pmap, v)); + std::vector obb_points; find_obb(points, obb_points, la_traits, use_ch); @@ -248,7 +247,7 @@ void find_obb(PolygonMesh& pmesh, } template -void find_obb(PolygonMesh& pmesh, +void find_obb(const PolygonMesh& pmesh, PolygonMesh& obbmesh, bool use_ch) { diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/test_linear_algebra_functions.cpp b/Optimal_bounding_box/test/Optimal_bounding_box/test_linear_algebra_functions.cpp index fd2e7a45f5b..673624a81fc 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/test_linear_algebra_functions.cpp +++ b/Optimal_bounding_box/test/Optimal_bounding_box/test_linear_algebra_functions.cpp @@ -1,8 +1,8 @@ #include #include +#include #include #include - #include bool assert_doubles(double d1, double d2, double epsilon)