regulators: Modify instances for implicit conversion

Modify instances for implicit conversion of JSON element
values within the config file parser.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: Ifeeb0ae42085708c6145135bfc30a0a786a656ae
diff --git a/phosphor-regulators/src/config_file_parser.hpp b/phosphor-regulators/src/config_file_parser.hpp
index 66c4c93..558debc 100644
--- a/phosphor-regulators/src/config_file_parser.hpp
+++ b/phosphor-regulators/src/config_file_parser.hpp
@@ -124,7 +124,7 @@
     {
         throw std::invalid_argument{"Element is not an integer"};
     }
-    int value = element;
+    int value = element.get<int>();
     if ((value < 0) || (value > 7))
     {
         throw std::invalid_argument{"Element is not a bit position"};
@@ -149,7 +149,7 @@
     {
         throw std::invalid_argument{"Element is not an integer"};
     }
-    int value = element;
+    int value = element.get<int>();
     if ((value < 0) || (value > 1))
     {
         throw std::invalid_argument{"Element is not a bit value"};
@@ -281,7 +281,7 @@
     {
         throw std::invalid_argument{"Element is not a string"};
     }
-    std::string value = element;
+    std::string value = element.get<std::string>();
 
     bool isHex = (value.compare(0, 2, "0x") == 0) && (value.size() > 2) &&
                  (value.size() < 5) &&
@@ -376,7 +376,7 @@
     {
         throw std::invalid_argument{"Element is not an integer"};
     }
-    int value = element;
+    int value = element.get<int>();
     if ((value < INT8_MIN) || (value > INT8_MAX))
     {
         throw std::invalid_argument{"Element is not an 8-bit signed integer"};
@@ -523,7 +523,7 @@
     {
         throw std::invalid_argument{"Element is not a string"};
     }
-    std::string value = element;
+    std::string value = element.get<std::string>();
     if (value.empty() && !isEmptyValid)
     {
         throw std::invalid_argument{"Element contains an empty string"};
@@ -548,7 +548,7 @@
     {
         throw std::invalid_argument{"Element is not an integer"};
     }
-    int value = element;
+    int value = element.get<int>();
     if ((value < 0) || (value > UINT8_MAX))
     {
         throw std::invalid_argument{"Element is not an 8-bit unsigned integer"};