Unverified Commit 429dd038 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

core: fix cast

parent 4f7332c6
//
// Copyright (c) 2016-2018 CNRS
// Copyright (c) 2016-2020 CNRS INRIA
//
#ifndef __pinocchio_special_orthogonal_operation_hpp__
......@@ -81,7 +81,7 @@ namespace pinocchio
{
typedef typename Matrix2Like::Scalar Scalar;
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix2Like,2,2);
return (Scalar)1;
return Scalar(1);
}
/// Get dimension of Lie Group vector representation
......@@ -172,22 +172,22 @@ namespace pinocchio
}
template <class Config_t, class Tangent_t, class JacobianOut_t>
static void dIntegrate_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<JacobianOut_t>& J,
static void dIntegrate_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<JacobianOut_t> & J,
const AssignmentOperatorType op)
{
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J);
switch(op)
{
case SETTO:
Jout(0,0) = 1;
Jout(0,0) = Scalar(1);
break;
case ADDTO:
Jout(0,0) += 1;
Jout(0,0) += Scalar(1);
break;
case RMTO:
Jout(0,0) -= 1;
Jout(0,0) -= Scalar(1);
break;
default:
assert(false && "Wrong Op requesed value");
......@@ -196,22 +196,22 @@ namespace pinocchio
}
template <class Config_t, class Tangent_t, class JacobianOut_t>
static void dIntegrate_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<JacobianOut_t>& J,
static void dIntegrate_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<JacobianOut_t> & J,
const AssignmentOperatorType op)
{
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J);
switch(op)
{
case SETTO:
Jout(0,0) = 1;
Jout(0,0) = Scalar(1);
break;
case ADDTO:
Jout(0,0) += 1;
Jout(0,0) += Scalar(1);
break;
case RMTO:
Jout(0,0) -= 1;
Jout(0,0) -= Scalar(1);
break;
default:
assert(false && "Wrong Op requesed value");
......@@ -484,8 +484,7 @@ namespace pinocchio
template <class ConfigL_t, class ConfigR_t, class ConfigOut_t>
void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> &,
const Eigen::MatrixBase<ConfigR_t> &,
const Eigen::MatrixBase<ConfigOut_t> & qout)
const
const Eigen::MatrixBase<ConfigOut_t> & qout) const
{
random_impl(qout);
}
......
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