From 5da5f100e60d2b77a6f9fd106547a5e46cc05509 Mon Sep 17 00:00:00 2001 From: Pierre Gergondet Date: Thu, 27 Aug 2020 11:19:43 +0800 Subject: [PATCH] Fix warning --- src/RBDyn/Momentum.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RBDyn/Momentum.cpp b/src/RBDyn/Momentum.cpp index fb97559b..78e482ab 100644 --- a/src/RBDyn/Momentum.cpp +++ b/src/RBDyn/Momentum.cpp @@ -28,7 +28,8 @@ void computeCentroidalInertia(const MultiBody & mb, ci = Matrix6d::Identity(); sva::PTransformd X_com_0(Vector3d(-com)); - for(int i = 0; i < mb.nrBodies(); ++i) + size_t nrBodies = static_cast(mb.nrBodies()); + for(size_t i = 0; i < nrBodies; ++i) { // body momentum in body coordinate sva::ForceVecd hi = bodies[i].inertia() * mbc.bodyVelB[i];