Verified Commit 6ded221b authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: improvide effiency of visitor

parent 46060474
......@@ -126,7 +126,7 @@ namespace pinocchio
ReturnType operator()(const JointModelBase<JointModelDerived> & jmodel) const
{
return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
bf::append2(boost::ref(jmodel),
bf::append2(boost::ref(jmodel.derived()),
boost::ref(boost::get<typename JointModelBase<JointModelDerived>::JointDataDerived >(jdata)),
args));
}
......@@ -151,7 +151,7 @@ namespace pinocchio
ReturnType operator()(const JointModelBase<JointModelDerived> & jmodel) const
{
return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
bf::make_vector(boost::ref(jmodel),
bf::make_vector(boost::ref(jmodel.derived()),
boost::ref(boost::get<typename JointModelBase<JointModelDerived>::JointDataDerived >(jdata)))
);
}
......@@ -170,7 +170,7 @@ namespace pinocchio
ReturnType operator()(const JointModelBase<JointModelDerived> & jmodel) const
{
return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
bf::append(boost::ref(jmodel),
bf::append(boost::ref(jmodel.derived()),
args));
}
......@@ -188,7 +188,7 @@ namespace pinocchio
template<typename JointModelDerived>
ReturnType operator()(const JointModelBase<JointModelDerived> & jmodel) const
{
return JointVisitorDerived::template algo<JointModelDerived>(jmodel);
return JointVisitorDerived::template algo<JointModelDerived>(jmodel.derived());
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment