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>
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index 48546af..4c0fe01 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -32,8 +32,6 @@
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 @@
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 @@
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)
{