From aec381c32fd0bf6c4fd2ea31b6f3f7aa9fc9ebb4 Mon Sep 17 00:00:00 2001 From: Pierre Fernbach <pierre.fernbach@laas.fr> Date: Tue, 26 Nov 2019 10:22:11 +0100 Subject: [PATCH] [cleaning] fix compilation warnings --- include/curves/helpers/effector_spline_rotation.h | 2 +- include/curves/optimization/definitions.h | 4 ++-- include/curves/optimization/details.h | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/curves/helpers/effector_spline_rotation.h b/include/curves/helpers/effector_spline_rotation.h index ad503e7..aaf06d6 100644 --- a/include/curves/helpers/effector_spline_rotation.h +++ b/include/curves/helpers/effector_spline_rotation.h @@ -89,9 +89,9 @@ class rotation_spline : public curve_abc_quat_t { virtual time_t max() const { return max_; } /*Attributes*/ - std::size_t dim_; // const Eigen::Quaterniond quat_from_; // const Eigen::Quaterniond quat_to_; // const + std::size_t dim_; // const double min_; // const double max_; // const exact_cubic_constraint_one_dim time_reparam_; // const diff --git a/include/curves/optimization/definitions.h b/include/curves/optimization/definitions.h index ae5e2f4..2752be2 100644 --- a/include/curves/optimization/definitions.h +++ b/include/curves/optimization/definitions.h @@ -49,7 +49,7 @@ struct problem_definition : public curve_constraints<Point> { typedef typename T_matrix_x_t::const_iterator CIT_matrix_x_t; typedef typename T_vector_x_t::const_iterator CIT_vector_x_t; - problem_definition(const int dim) + problem_definition(const std::size_t dim) : curve_constraints_t(dim), flag(NONE), init_pos(point_t::Zero(dim)), @@ -77,7 +77,7 @@ struct problem_definition : public curve_constraints<Point> { vector_x_t splitTimes_; T_matrix_x_t inequalityMatrices_; // must be of size (splitTimes_ + 1) T_vector_x_t inequalityVectors_; // must be of size (splitTimes_ + 1) - const int dim_; + const std::size_t dim_; }; } // namespace optimization diff --git a/include/curves/optimization/details.h b/include/curves/optimization/details.h index 71ea6bb..a8e3a88 100644 --- a/include/curves/optimization/details.h +++ b/include/curves/optimization/details.h @@ -19,7 +19,7 @@ namespace curves { namespace optimization { template <typename Point, typename Numeric, bool Safe = true> struct problem_data { - problem_data(const int dim) : bezier(0), dim_(dim) {} + problem_data(const std::size_t dim) : bezier(0), dim_(dim) {} ~problem_data() { if (bezier) delete bezier; } @@ -34,7 +34,7 @@ struct problem_data { std::size_t startVariableIndex; // before that index, variables are constant std::size_t numStateConstraints; bezier_t* bezier; - const int dim_; + const std::size_t dim_; problem_data(const problem_data& other) : variables_(other.variables_), @@ -60,7 +60,7 @@ inline std::size_t num_active_constraints(const constraint_flag& flag) { template <typename Numeric, typename LinearVar> LinearVar fill_with_zeros(const LinearVar& var, const std::size_t i, const std::size_t startVariableIndex, - const std::size_t numVariables, const int Dim) { + const std::size_t numVariables, const std::size_t Dim) { typedef Eigen::Matrix<Numeric, Eigen::Dynamic, Eigen::Dynamic> matrix_t; typename LinearVar::matrix_x_t B; B = matrix_t::Zero(Dim, numVariables * Dim); @@ -226,7 +226,7 @@ std::vector<bezier_curve<Numeric, Numeric, true, linear_variable<Numeric> > > sp template <typename Point, typename Numeric> void initInequalityMatrix(const problem_definition<Point, Numeric>& pDef, problem_data<Point, Numeric>& pData, quadratic_problem<Point, Numeric>& prob) { - const int& Dim = pData.dim_; + const std::size_t& Dim = pData.dim_; typedef problem_definition<Point, Numeric> problem_definition_t; typedef typename problem_definition_t::matrix_x_t matrix_x_t; typedef typename problem_definition_t::vector_x_t vector_x_t; @@ -269,7 +269,7 @@ void initInequalityMatrix(const problem_definition<Point, Numeric>& pDef, proble template <typename Point, typename Numeric, typename In> quadratic_variable<Numeric> bezier_product(In PointsBegin1, In PointsEnd1, In PointsBegin2, In PointsEnd2, - const int /*Dim*/) { + const std::size_t /*Dim*/) { typedef Eigen::Matrix<Numeric, Eigen::Dynamic, 1> vector_x_t; unsigned int nPoints1 = (unsigned int)(std::distance(PointsBegin1, PointsEnd1)), nPoints2 = (unsigned int)(std::distance(PointsBegin2, PointsEnd2)); -- GitLab