Stop using mapbox directly
This is going to be removed from sdbusplus
Change-Id: I912f560fac7d41e13d3754df9363b95cedac78f8
Signed-off-by: Yoo, Jae Hyun <jae.hyun.yoo@intel.com>
diff --git a/sensors/src/FanMain.cpp b/sensors/src/FanMain.cpp
index 6818692..b562e05 100644
--- a/sensors/src/FanMain.cpp
+++ b/sensors/src/FanMain.cpp
@@ -31,6 +31,7 @@
static constexpr bool DEBUG = false;
namespace fs = std::experimental::filesystem;
+namespace variant_ns = sdbusplus::message::variant_ns;
static constexpr std::array<const char*, 1> SENSOR_TYPES = {
"xyz.openbmc_project.Configuration.AspeedFan"};
static std::regex INPUT_REGEX(R"(fan(\d+)_input)");
@@ -117,8 +118,8 @@
{
continue;
}
- uint16_t pwmIndex = mapbox::util::apply_visitor(
- VariantToUnsignedIntVisitor(), findPwmIndex->second);
+ uint16_t pwmIndex = variant_ns::visit(VariantToUnsignedIntVisitor(),
+ findPwmIndex->second);
auto oemNamePath = directory.string() + R"(/of_node/oemname)" +
std::to_string(pwmIndex);
@@ -144,7 +145,7 @@
std::cerr << baseConfiguration->first << " missing index\n";
continue;
}
- unsigned int configIndex = mapbox::util::apply_visitor(
+ unsigned int configIndex = variant_ns::visit(
VariantToUnsignedIntVisitor(), findIndex->second);
if (configIndex != index)
@@ -157,7 +158,7 @@
{
continue;
}
- std::string connectorName = mapbox::util::apply_visitor(
+ std::string connectorName = variant_ns::visit(
VariantToStringVisitor(), findConnectorName->second);
boost::replace_all(connectorName, " ", "_");
if (connectorName == oemName)