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());
}