Fix CPU client address config handling
Entity manager doesn't allow hex string config anymore. To support
the change in entity manager, this patch makes CPU client address
config reading use visitor instead of hexa-decimal handling.
Change-Id: Id7e77408852e679f6ddba5dd062c202f12581e2a
Signed-off-by: Yoo, Jae Hyun <jae.hyun.yoo@intel.com>
diff --git a/sensors/src/CPUSensorMain.cpp b/sensors/src/CPUSensorMain.cpp
index def889b..6318dd8 100644
--- a/sensors/src/CPUSensorMain.cpp
+++ b/sensors/src/CPUSensorMain.cpp
@@ -420,9 +420,8 @@
{
continue;
}
- std::string addrStr = mapbox::util::apply_visitor(
- VariantToStringVisitor(), findAddress->second);
- int addr = std::stoi(addrStr, 0, 16);
+ int addr = mapbox::util::apply_visitor(VariantToIntVisitor(),
+ findAddress->second);
auto findName = config.second.find("Name");
if (findName == config.second.end())