From a005d2a944a80268718f7dd42afb0b72a829c6e9 Mon Sep 17 00:00:00 2001
From: Olivier Stasse <ostasse@laas.fr>
Date: Tue, 16 Jul 2019 01:52:17 +0200
Subject: [PATCH] Fix zero

---
 src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp b/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp
index d3531184..2f117b61 100644
--- a/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp
+++ b/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp
@@ -1779,8 +1779,8 @@ void NMPCgenerator::initializeFootVelIneqConstraint()
   Bvel_.resize(nc_vel_)  ;
   gU_vel_.resize(nc_vel_);
 
-  {for(unsigned int i=0;i<Avel_.rows();i++) for(unsigned int j=0;j<Avel_.cols();j++) Avel_(i,j)=0.0;}  ;
-  { for(unsigned int i=0;i<Bvel_.size();Bvel_[i++]=0.0);}  ;
+  Avel_.setZero();
+  Bvel_.setZero();
 
   for(unsigned i=0 ; i<nf_ ; ++i)
   {
-- 
GitLab