sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8d012f098dcca98ddbaf82e29219a15ddde5ba62
diff --git a/snmp_notification.cpp b/snmp_notification.cpp
index 5b548f6..afce3ce 100644
--- a/snmp_notification.cpp
+++ b/snmp_notification.cpp
@@ -13,7 +13,6 @@
namespace snmp
{
-namespace variant_ns = sdbusplus::message::variant_ns;
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
@@ -28,28 +27,28 @@
{
case ASN_INTEGER:
{
- auto ltmp = variant_ns::get<int32_t>(val);
+ auto ltmp = std::get<int32_t>(val);
varList = snmp_pdu_add_variable(&pdu, objID.data(), objIDLen, type,
<mp, sizeof(ltmp));
}
break;
case ASN_UNSIGNED:
{
- auto ltmp = variant_ns::get<uint32_t>(val);
+ auto ltmp = std::get<uint32_t>(val);
varList = snmp_pdu_add_variable(&pdu, objID.data(), objIDLen, type,
<mp, sizeof(ltmp));
}
break;
case ASN_OPAQUE_U64:
{
- auto ltmp = variant_ns::get<uint64_t>(val);
+ auto ltmp = std::get<uint64_t>(val);
varList = snmp_pdu_add_variable(&pdu, objID.data(), objIDLen, type,
<mp, sizeof(ltmp));
}
break;
case ASN_OCTET_STR:
{
- const auto& value = variant_ns::get<std::string>(val);
+ const auto& value = std::get<std::string>(val);
varList = snmp_pdu_add_variable(&pdu, objID.data(), objIDLen, type,
value.c_str(), value.length());
}
diff --git a/snmp_util.cpp b/snmp_util.cpp
index b5cea81..e12133b 100644
--- a/snmp_util.cpp
+++ b/snmp_util.cpp
@@ -13,7 +13,6 @@
namespace phosphor
{
-namespace variant_ns = sdbusplus::message::variant_ns;
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
@@ -104,8 +103,8 @@
auto& intfMap = objIter.second;
auto& snmpClientProps = intfMap.at(clientIntf);
auto& address =
- variant_ns::get<std::string>(snmpClientProps.at("Address"));
- auto& port = variant_ns::get<uint16_t>(snmpClientProps.at("Port"));
+ std::get<std::string>(snmpClientProps.at("Address"));
+ auto& port = std::get<uint16_t>(snmpClientProps.at("Port"));
auto ipaddress = phosphor::network::resolveAddress(address);
auto mgr = std::move(ipaddress);
if (port > 0)