Skip to content

Commit

Permalink
Fix compilation on Windows 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloRendiniello committed Nov 21, 2018
1 parent b65ad99 commit f4feb11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace iDynTree {
InverseKinematicsRotationParametrizationRollPitchYaw, /*!< Roll Pitch Yaw parametrization */
};

inline unsigned sizeOfRotationParametrization(enum InverseKinematicsRotationParametrization rotationParametrization)
inline int sizeOfRotationParametrization(enum InverseKinematicsRotationParametrization rotationParametrization)
{
switch (rotationParametrization) {
case InverseKinematicsRotationParametrizationQuaternion:
Expand Down
8 changes: 4 additions & 4 deletions src/inverse-kinematics/src/InverseKinematicsNLP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ namespace kinematics {

bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixDynSize& newConstraint)
{
return addConstraintSparsityPattern(newConstraint, {0, newConstraint.rows()});
return addConstraintSparsityPattern(newConstraint, {0, static_cast<ptrdiff_t>(newConstraint.rows())});
}

template<unsigned int nRows, unsigned int nCols>
bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixFixSize<nRows, nCols>& newConstraint)
{
return addConstraintSparsityPattern(newConstraint, {0, newConstraint.rows()});
return addConstraintSparsityPattern(newConstraint, {0, static_cast<ptrdiff_t>(newConstraint.rows())});
}

bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixDynSize& newConstraint,
Expand Down Expand Up @@ -1226,15 +1226,15 @@ void InverseKinematicsNLP::addSparsityInformationForConstraint(int constraintID,
iDynTree::toEigen(comInfo.projectedComJacobian) =
iDynTree::toEigen(m_data.m_comHullConstraint.A) * iDynTree::toEigen(m_data.m_comHullConstraint.Pdirection) * iDynTree::toEigen(comInfo.comJacobianAnalytical);

m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, comInfo.projectedComJacobian.rows()},
m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, static_cast<ptrdiff_t>(comInfo.projectedComJacobian.rows())},
comInfo.projectedComJacobian, 0,
values);

constraintIndex += comInfo.projectedComJacobian.rows();
}

if (m_data.isCoMTargetActive()) {
m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, comInfo.comJacobianAnalytical.rows()},
m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, static_cast<ptrdiff_t>(comInfo.comJacobianAnalytical.rows())},
comInfo.comJacobianAnalytical, 0,
values);
constraintIndex += 3;
Expand Down

0 comments on commit f4feb11

Please sign in to comment.