From 52358edf5745b0fac55a75092cc0c21253cef0d7 Mon Sep 17 00:00:00 2001 From: Megane Millan Date: Fri, 11 Oct 2024 16:35:53 +0200 Subject: [PATCH] [EtienneAr Feedback] Add explicit to single argument constructors --- include/pinocchio/multibody/joint/joint-mimic.hpp | 2 +- include/pinocchio/serialization/joints-model.hpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/pinocchio/multibody/joint/joint-mimic.hpp b/include/pinocchio/multibody/joint/joint-mimic.hpp index 53aeaa25c..da977040e 100644 --- a/include/pinocchio/multibody/joint/joint-mimic.hpp +++ b/include/pinocchio/multibody/joint/joint-mimic.hpp @@ -168,7 +168,7 @@ namespace pinocchio struct TransposeConst { const ScaledJointMotionSubspaceTpl & ref; - TransposeConst(const ScaledJointMotionSubspaceTpl & ref) + explicit TransposeConst(const ScaledJointMotionSubspaceTpl & ref) : ref(ref) { } diff --git a/include/pinocchio/serialization/joints-model.hpp b/include/pinocchio/serialization/joints-model.hpp index 485558752..45fec54d5 100644 --- a/include/pinocchio/serialization/joints-model.hpp +++ b/include/pinocchio/serialization/joints-model.hpp @@ -71,7 +71,7 @@ namespace boost Derived & joint; public: - SetJointIndexes(Derived & joint) + explicit SetJointIndexes(Derived & joint) : joint(joint) {}; void run(pinocchio::JointIndex i_id, int i_q, int i_v, int i_j) @@ -86,7 +86,8 @@ namespace boost pinocchio::JointModelMimicTpl & joint; public: - SetJointIndexes(pinocchio::JointModelMimicTpl & joint) + explicit SetJointIndexes( + pinocchio::JointModelMimicTpl & joint) : joint(joint) {}; void run(pinocchio::JointIndex i_id, int i_q, int i_v, int i_j)