summaryrefslogtreecommitdiffstats
path: root/sensorhandler.cpp
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2019-04-09 11:44:36 -0700
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-04-18 22:40:32 +0000
commitf442e119aed2dc87f320bf230ad39e7dc5c72524 (patch)
treefe834d199e48249934b3c84aa92db536aea3ef25 /sensorhandler.cpp
parent5b2535f89023d0ea220ccc24200a9b51c142c08d (diff)
downloadphosphor-host-ipmid-f442e119aed2dc87f320bf230ad39e7dc5c72524.tar.gz
phosphor-host-ipmid-f442e119aed2dc87f320bf230ad39e7dc5c72524.zip
move variant to std namespace
sdbusplus::message::variant_ns has been std for a while now. This moves ipmid away from sdbusplus::message::variant_ns to directly use std::variant. Tested-by: built, compiles, and runs the same as before. Change-Id: I8caa945f31c926c2721319f001b9d7f83fd3f1b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'sensorhandler.cpp')
-rw-r--r--sensorhandler.cpp18
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)
{
OpenPOWER on IntegriCloud