From f4feb110f76a75895c04aab296cd500b66a4af02 Mon Sep 17 00:00:00 2001 From: Angelo Date: Wed, 21 Nov 2018 07:36:08 +0100 Subject: [PATCH] Fix compilation on Windows 32-bit --- .../include/iDynTree/InverseKinematics.h | 2 +- src/inverse-kinematics/src/InverseKinematicsNLP.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/inverse-kinematics/include/iDynTree/InverseKinematics.h b/src/inverse-kinematics/include/iDynTree/InverseKinematics.h index 1ef18c9ec11..46e32c393c5 100644 --- a/src/inverse-kinematics/include/iDynTree/InverseKinematics.h +++ b/src/inverse-kinematics/include/iDynTree/InverseKinematics.h @@ -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: diff --git a/src/inverse-kinematics/src/InverseKinematicsNLP.cpp b/src/inverse-kinematics/src/InverseKinematicsNLP.cpp index 6399753943b..95833d31e6c 100644 --- a/src/inverse-kinematics/src/InverseKinematicsNLP.cpp +++ b/src/inverse-kinematics/src/InverseKinematicsNLP.cpp @@ -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(newConstraint.rows())}); } template bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixFixSize& newConstraint) { - return addConstraintSparsityPattern(newConstraint, {0, newConstraint.rows()}); + return addConstraintSparsityPattern(newConstraint, {0, static_cast(newConstraint.rows())}); } bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixDynSize& newConstraint, @@ -1226,7 +1226,7 @@ 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(comInfo.projectedComJacobian.rows())}, comInfo.projectedComJacobian, 0, values); @@ -1234,7 +1234,7 @@ void InverseKinematicsNLP::addSparsityInformationForConstraint(int constraintID, } if (m_data.isCoMTargetActive()) { - m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, comInfo.comJacobianAnalytical.rows()}, + m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, static_cast(comInfo.comJacobianAnalytical.rows())}, comInfo.comJacobianAnalytical, 0, values); constraintIndex += 3;