summaryrefslogtreecommitdiff
path: root/redfish-core/lib
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/lib')
-rw-r--r--redfish-core/lib/certificate_service.hpp2
-rw-r--r--redfish-core/lib/health.hpp6
-rw-r--r--redfish-core/lib/managers.hpp3
-rw-r--r--redfish-core/lib/sensors.hpp2
-rw-r--r--redfish-core/lib/task.hpp2
5 files changed, 9 insertions, 6 deletions
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index b931c7db75..2fc606d645 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -155,7 +155,7 @@ class CertificateFile
CertificateFile& operator=(const CertificateFile&) = delete;
CertificateFile(CertificateFile&&) = delete;
CertificateFile& operator=(CertificateFile&&) = delete;
- CertificateFile(const std::string& certString)
+ explicit CertificateFile(const std::string& certString)
{
std::array<char, 18> dirTemplate = {'/', 't', 'm', 'p', '/', 'C',
'e', 'r', 't', 's', '.', 'X',
diff --git a/redfish-core/lib/health.hpp b/redfish-core/lib/health.hpp
index 04281bf903..cf84c9306a 100644
--- a/redfish-core/lib/health.hpp
+++ b/redfish-core/lib/health.hpp
@@ -31,8 +31,10 @@ namespace redfish
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
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index f15fb0b10d..bda5a1a2dc 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -1168,7 +1168,8 @@ inline CreatePIDRet createPidInterface(
struct GetPIDValues : std::enable_shared_from_this<GetPIDValues>
{
- GetPIDValues(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn) :
+ explicit GetPIDValues(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn) :
asyncResp(asyncRespIn)
{}
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index ca842d913d..8b97b7c79e 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -307,7 +307,7 @@ enum class LedState
class InventoryItem
{
public:
- InventoryItem(const std::string& objPath) : objectPath(objPath)
+ explicit InventoryItem(const std::string& objPath) : objectPath(objPath)
{
// Set inventory item name to last node of object path
sdbusplus::message::object_path path(objectPath);
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index b1b1d22fb3..dcad059655 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -39,7 +39,7 @@ constexpr bool completed = true;
struct Payload
{
- Payload(const crow::Request& req) :
+ explicit Payload(const crow::Request& req) :
targetUri(req.url), httpOperation(req.methodString()),
httpHeaders(nlohmann::json::array())