diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-01-23 03:40:12 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-02-09 04:54:39 +0300 |
commit | abf2add6a35aaf42ba60c4ae955a4d8925b13b19 (patch) | |
tree | fe3e8aadb5bb92455cf504d50d7a99478b35ec67 /redfish-core/lib/update_service.hpp | |
parent | 734bfe90949b230b1d3e061522f45903c10c7b08 (diff) | |
download | bmcweb-abf2add6a35aaf42ba60c4ae955a4d8925b13b19.tar.xz |
bmcweb: move variant usage to std namespace
Change-Id: I9d7069668f91f2ac72d2f4a440f63e0e85dd5269
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'redfish-core/lib/update_service.hpp')
-rw-r--r-- | redfish-core/lib/update_service.hpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp index d5ecf24765..5d5b3ea3db 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp @@ -18,6 +18,7 @@ #include "node.hpp" #include <boost/container/flat_map.hpp> +#include <variant> namespace redfish { @@ -69,7 +70,7 @@ class UpdateService : public Node "xyz.openbmc_project.Software.BMC.Updater", objPath, "org.freedesktop.DBus.Properties", "Set", "xyz.openbmc_project.Software.Activation", "RequestedActivation", - sdbusplus::message::variant<std::string>( + std::variant<std::string>( "xyz.openbmc_project.Software.Activation.RequestedActivations." "Active")); } @@ -125,8 +126,7 @@ class UpdateService : public Node } std::vector<std::pair< std::string, - std::vector<std::pair< - std::string, sdbusplus::message::variant<std::string>>>>> + std::vector<std::pair<std::string, std::variant<std::string>>>>> interfacesProperties; sdbusplus::message::object_path objPath; @@ -260,8 +260,7 @@ class SoftwareInventoryCollection : public Node } const std::string *swActivationStatus = - sdbusplus::message::variant_ns::get_if< - std::string>(&activation); + std::get_if<std::string>(&activation); if (swActivationStatus == nullptr) { messages::internalError(asyncResp->res); @@ -401,8 +400,7 @@ class SoftwareInventory : public Node return; } const std::string *swInvPurpose = - sdbusplus::message::variant_ns::get_if< - std::string>(&it->second); + std::get_if<std::string>(&it->second); if (swInvPurpose == nullptr) { BMCWEB_LOG_DEBUG @@ -427,8 +425,7 @@ class SoftwareInventory : public Node BMCWEB_LOG_DEBUG << "Version found!"; const std::string *version = - sdbusplus::message::variant_ns::get_if< - std::string>(&it->second); + std::get_if<std::string>(&it->second); if (version == nullptr) { |