diff --git a/gtsam/inference/BayesNet.h b/gtsam/inference/BayesNet.h index a05440d69..0f78a15e3 100644 --- a/gtsam/inference/BayesNet.h +++ b/gtsam/inference/BayesNet.h @@ -81,7 +81,7 @@ public: } /** BayesNet with 1 conditional */ - BayesNet(const sharedConditional& conditional) { push_back(conditional); } + explicit BayesNet(const sharedConditional& conditional) { push_back(conditional); } /// @} /// @name Testable diff --git a/gtsam/inference/BayesTree.h b/gtsam/inference/BayesTree.h index 06a47ba8e..9cba86267 100644 --- a/gtsam/inference/BayesTree.h +++ b/gtsam/inference/BayesTree.h @@ -144,7 +144,7 @@ namespace gtsam { BayesTree() {} /** Create a Bayes Tree from a Bayes Net (requires CONDITIONAL is IndexConditional *or* CONDITIONAL::Combine) */ - BayesTree(const BayesNet& bayesNet); + explicit BayesTree(const BayesNet& bayesNet); /// @} /// @name Advanced Constructors