Require explicit decorator on one arg constructors
We essentially follow this rule already, not relying on implicit
operators, although there are a number of cases where in theory we
could've implicitly constructed an object.
This commit enables the clang-tidy check.
Tested: Code compiles, passes clang-tidy.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia428463313b075c69614fdb326e8c5c094e7adde
diff --git a/redfish-core/lib/health.hpp b/redfish-core/lib/health.hpp
index 04281bf..cf84c93 100644
--- a/redfish-core/lib/health.hpp
+++ b/redfish-core/lib/health.hpp
@@ -31,8 +31,10 @@
struct HealthPopulate : std::enable_shared_from_this<HealthPopulate>
{
// By default populate status to "/Status" of |asyncResp->res.jsonValue|.
- HealthPopulate(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn) :
- asyncResp(asyncRespIn), statusPtr("/Status")
+ explicit HealthPopulate(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn) :
+ asyncResp(asyncRespIn),
+ statusPtr("/Status")
{}
// Takes a JSON pointer rather than a reference. This is pretty useful when