diff options
Diffstat (limited to 'sensorhandler.cpp')
-rw-r--r-- | sensorhandler.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sensorhandler.cpp b/sensorhandler.cpp index 48546af..4c0fe01 100644 --- a/sensorhandler.cpp +++ b/sensorhandler.cpp @@ -32,8 +32,6 @@ 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 @@ -443,10 +441,10 @@ void getSensorThresholds(uint8_t sensorNum, auto warnThresholds = ipmi::getAllDbusProperties( bus, service, info.sensorPath, warningThreshIntf); - double warnLow = variant_ns::visit(ipmi::VariantToDoubleVisitor(), - warnThresholds["WarningLow"]); - double warnHigh = variant_ns::visit(ipmi::VariantToDoubleVisitor(), - warnThresholds["WarningHigh"]); + double warnLow = std::visit(ipmi::VariantToDoubleVisitor(), + warnThresholds["WarningLow"]); + double warnHigh = std::visit(ipmi::VariantToDoubleVisitor(), + warnThresholds["WarningHigh"]); if (warnLow != 0) { @@ -468,10 +466,10 @@ void getSensorThresholds(uint8_t sensorNum, auto critThresholds = ipmi::getAllDbusProperties( bus, service, info.sensorPath, criticalThreshIntf); - double critLow = variant_ns::visit(ipmi::VariantToDoubleVisitor(), - critThresholds["CriticalLow"]); - double critHigh = variant_ns::visit(ipmi::VariantToDoubleVisitor(), - critThresholds["CriticalHigh"]); + double critLow = std::visit(ipmi::VariantToDoubleVisitor(), + critThresholds["CriticalLow"]); + double critHigh = std::visit(ipmi::VariantToDoubleVisitor(), + critThresholds["CriticalHigh"]); if (critLow != 0) { |