Add explicit keyword to 1 arg constructors
The cppcheck tool complains about it otherwise.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id977a6c349b0b49354b52ac994ea7742e0a39307
diff --git a/control/json/utils/modifier.cpp b/control/json/utils/modifier.cpp
index 501a035..91978e7 100644
--- a/control/json/utils/modifier.cpp
+++ b/control/json/utils/modifier.cpp
@@ -93,7 +93,7 @@
*/
struct MinusOperator : public Modifier::BaseOperator
{
- MinusOperator(const json& jsonObj) :
+ explicit MinusOperator(const json& jsonObj) :
arg(ConfigBase::getJsonValue(jsonObj["value"]))
{}
@@ -162,7 +162,7 @@
*/
struct LessThanOperator : public Modifier::BaseOperator
{
- LessThanOperator(const json& jsonObj)
+ explicit LessThanOperator(const json& jsonObj)
{
const auto& valueArray = jsonObj["value"];
if (!valueArray.is_array())