diff options
author | James Feist <james.feist@linux.intel.com> | 2018-10-12 14:57:06 -0700 |
---|---|---|
committer | James Feist <james.feist@linux.intel.com> | 2018-10-18 00:54:34 +0000 |
commit | 3754442944d08235dc519c371d2222b53bca3fe3 (patch) | |
tree | e9a6d870dd53bc19c3320d6881e3c19fbcbf2c83 | |
parent | 2e63352fe8893a65e45690402d8681644b572e12 (diff) | |
download | phosphor-host-ipmid-3754442944d08235dc519c371d2222b53bca3fe3.tar.gz phosphor-host-ipmid-3754442944d08235dc519c371d2222b53bca3fe3.zip |
Remove direct uses of mapbox
sdbusplus is moving to std::variant, remove direct
uses of mapbox to limit breakage.
Tested-by: It built
Change-Id: I3fe0ba0d96b6aad302927363b9596cc1bcce2393
Signed-off-by: James Feist <james.feist@linux.intel.com>
-rw-r--r-- | sensordatahandler.cpp | 2 | ||||
-rw-r--r-- | sensorhandler.cpp | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp index f5c1e53..c973f2e 100644 --- a/sensordatahandler.cpp +++ b/sensordatahandler.cpp @@ -260,7 +260,7 @@ ipmi_ret_t assertion(const SetSensorReadingReq& cmdData, const Info& sensorInfo) for (const auto& property : interface->second) { - Value tmp{mapbox::util::no_init()}; + Value tmp{sdbusplus::message::variant_ns::no_init()}; for (const auto& value : std::get<OffsetValueMap>(property.second)) { if (bothSet.size() <= value.first || !bothSet.test(value.first)) diff --git a/sensorhandler.cpp b/sensorhandler.cpp index 770f6dc..08a6325 100644 --- a/sensorhandler.cpp +++ b/sensorhandler.cpp @@ -31,6 +31,8 @@ using namespace phosphor::logging; using InternalFailure = sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; +namespace variant_ns = sdbusplus::message::variant_ns; + void register_netfn_sen_functions() __attribute__((constructor)); struct sensorTypemap_t @@ -451,10 +453,10 @@ void getSensorThresholds(uint8_t sensorNum, auto warnThresholds = ipmi::getAllDbusProperties( bus, service, info.sensorPath, warningThreshIntf); - double warnLow = mapbox::util::apply_visitor(ipmi::VariantToDoubleVisitor(), - warnThresholds["WarningLow"]); - double warnHigh = mapbox::util::apply_visitor( - ipmi::VariantToDoubleVisitor(), warnThresholds["WarningHigh"]); + double warnLow = variant_ns::apply_visitor(ipmi::VariantToDoubleVisitor(), + warnThresholds["WarningLow"]); + double warnHigh = variant_ns::apply_visitor(ipmi::VariantToDoubleVisitor(), + warnThresholds["WarningHigh"]); if (warnLow != 0) { @@ -476,10 +478,10 @@ void getSensorThresholds(uint8_t sensorNum, auto critThresholds = ipmi::getAllDbusProperties( bus, service, info.sensorPath, criticalThreshIntf); - double critLow = mapbox::util::apply_visitor(ipmi::VariantToDoubleVisitor(), - critThresholds["CriticalLow"]); - double critHigh = mapbox::util::apply_visitor( - ipmi::VariantToDoubleVisitor(), critThresholds["CriticalHigh"]); + double critLow = variant_ns::apply_visitor(ipmi::VariantToDoubleVisitor(), + critThresholds["CriticalLow"]); + double critHigh = variant_ns::apply_visitor(ipmi::VariantToDoubleVisitor(), + critThresholds["CriticalHigh"]); if (critLow != 0) { |