sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I86e11299512704fa1df1e5f6517ea25cc6eced8f
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 702136a..ae050ac 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -290,8 +290,7 @@
else if (propertyPair.first == "Nameservers")
{
const std::vector<std::string> *nameservers =
- sdbusplus::message::variant_ns::get_if<
- std::vector<std::string>>(
+ std::get_if<std::vector<std::string>>(
&propertyPair.second);
if (nameservers != nullptr)
{
@@ -301,8 +300,7 @@
else if (propertyPair.first == "StaticNameServers")
{
const std::vector<std::string> *staticNameServers =
- sdbusplus::message::variant_ns::get_if<
- std::vector<std::string>>(
+ std::get_if<std::vector<std::string>>(
&propertyPair.second);
if (staticNameServers != nullptr)
{
@@ -322,8 +320,7 @@
else if (propertyPair.first == "DomainName")
{
const std::vector<std::string> *domainNames =
- sdbusplus::message::variant_ns::get_if<
- std::vector<std::string>>(
+ std::get_if<std::vector<std::string>>(
&propertyPair.second);
if (domainNames != nullptr)
{
@@ -391,8 +388,7 @@
if (propertyPair.first == "HostName")
{
const std::string *hostname =
- sdbusplus::message::variant_ns::get_if<std::string>(
- &propertyPair.second);
+ std::get_if<std::string>(&propertyPair.second);
if (hostname != nullptr)
{
ethData.hostname = *hostname;
@@ -401,8 +397,7 @@
else if (propertyPair.first == "DefaultGateway")
{
const std::string *defaultGateway =
- sdbusplus::message::variant_ns::get_if<std::string>(
- &propertyPair.second);
+ std::get_if<std::string>(&propertyPair.second);
if (defaultGateway != nullptr)
{
ethData.default_gateway = *defaultGateway;
@@ -411,8 +406,7 @@
else if (propertyPair.first == "DefaultGateway6")
{
const std::string *defaultGateway6 =
- sdbusplus::message::variant_ns::get_if<std::string>(
- &propertyPair.second);
+ std::get_if<std::string>(&propertyPair.second);
if (defaultGateway6 != nullptr)
{
ethData.ipv6_default_gateway = *defaultGateway6;