From 65cc6e5380e81ad64a84406fac069a017e4f2eab Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Mon, 4 Apr 2016 14:16:24 +0200 Subject: [PATCH] Fix deprecated warning --- tests/path-projection.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/path-projection.cc b/tests/path-projection.cc index 9a9c857f..b2844191 100644 --- a/tests/path-projection.cc +++ b/tests/path-projection.cc @@ -29,6 +29,7 @@ #include <hpp/core/weighed-distance.hh> #include <hpp/core/config-projector.hh> #include <hpp/core/constraint-set.hh> +#include <hpp/core/problem.hh> #include <hpp/model/device.hh> #include <hpp/model/joint.hh> @@ -75,6 +76,9 @@ using boost::assign::list_of; using hpp::core::pathProjector::ProgressivePtr_t; using hpp::core::pathProjector::Progressive; +using hpp::core::Problem; +using hpp::core::ProblemPtr_t; + static matrix3_t identity () { matrix3_t R; R.setIdentity (); return R;} hpp::model::ObjectFactory objectFactory; @@ -178,8 +182,10 @@ int main (int , char**) { ConfigProjectorPtr_t proj = ConfigProjector::create (r, "test", 1e-4, 20); proj->add (NumericalConstraint::create (c)); cs->addConstraint (proj); + ProblemPtr_t problem (new Problem (r)); WeighedDistancePtr_t dist = WeighedDistance::create (r, list_of (1)(1)); - SteeringMethodPtr_t sm (SteeringMethodStraight::create (r, dist)); + problem->distance (dist); + SteeringMethodPtr_t sm (SteeringMethodStraight::create (problem)); const WeighedDistance& d = *dist; ProgressivePtr_t pp_ptr = Progressive::create (dist, sm, 0.1); Progressive pp = *pp_ptr; -- GitLab