Skip to content

Commit

Permalink
Merge pull request #1165 from cmastalli/topic/missed-scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
cmastalli authored Sep 1, 2023
2 parents f403e31 + 597d884 commit f2472b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions include/crocoddyl/core/activation-base.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2019-2021, LAAS-CNRS, University of Edinburgh
// Copyright (C) 2019-2023, LAAS-CNRS, University of Edinburgh,
// Heriot-Watt University
// Copyright note valid unless otherwise stated in individual files.
// All rights reserved.
///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -78,7 +79,7 @@ struct ActivationDataAbstractTpl {

template <template <typename Scalar> class Activation>
explicit ActivationDataAbstractTpl(Activation<Scalar>* const activation)
: a_value(0.),
: a_value(Scalar(0.)),
Ar(VectorXs::Zero(activation->get_nr())),
Arr(DiagonalMatrixXs(activation->get_nr())) {
Arr.setZero();
Expand Down
6 changes: 3 additions & 3 deletions include/crocoddyl/core/costs/cost-sum.hxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2019-2022, LAAS-CNRS, University of Edinburgh,
// Copyright (C) 2019-2023, LAAS-CNRS, University of Edinburgh,
// Heriot-Watt University
// Copyright note valid unless otherwise stated in individual files.
// All rights reserved.
Expand Down Expand Up @@ -106,7 +106,7 @@ void CostModelSumTpl<Scalar>::calc(const boost::shared_ptr<CostDataSum>& data,
throw_pretty("Invalid argument: "
<< "it doesn't match the number of cost datas and models");
}
data->cost = 0.;
data->cost = Scalar(0.);

typename CostModelContainer::iterator it_m, end_m;
typename CostDataContainer::iterator it_d, end_d;
Expand Down Expand Up @@ -138,7 +138,7 @@ void CostModelSumTpl<Scalar>::calc(const boost::shared_ptr<CostDataSum>& data,
throw_pretty("Invalid argument: "
<< "it doesn't match the number of cost datas and models");
}
data->cost = 0.;
data->cost = Scalar(0.);

typename CostModelContainer::iterator it_m, end_m;
typename CostDataContainer::iterator it_d, end_d;
Expand Down

0 comments on commit f2472b6

Please sign in to comment.