Add explicit keyword to regulator constructors
Add the 'explicit' keyword to regulator constructors. This prevents
automatic, unintended type promotions from occurring.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ice9983093114192c33d083b58cf85247d29792a8
diff --git a/phosphor-regulators/src/rule.hpp b/phosphor-regulators/src/rule.hpp
index 25be1e9..3fb21a6 100644
--- a/phosphor-regulators/src/rule.hpp
+++ b/phosphor-regulators/src/rule.hpp
@@ -52,7 +52,7 @@
*
* @param id unique rule ID
*/
- Rule(const std::string& id) : id{id}
+ explicit Rule(const std::string& id) : id{id}
{
}