From f442e119aed2dc87f320bf230ad39e7dc5c72524 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Tue, 9 Apr 2019 11:44:36 -0700 Subject: 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 --- app/watchdog_service.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'app') diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp index 284964d..0b88369 100644 --- a/app/watchdog_service.cpp +++ b/app/watchdog_service.cpp @@ -16,8 +16,6 @@ using phosphor::logging::elog; using phosphor::logging::entry; using phosphor::logging::level; using phosphor::logging::log; -using sdbusplus::message::variant_ns::get; -using sdbusplus::message::variant_ns::variant; using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; using sdbusplus::xyz::openbmc_project::State::server::convertForMessage; using sdbusplus::xyz::openbmc_project::State::server::Watchdog; @@ -72,18 +70,20 @@ WatchdogService::Properties WatchdogService::getProperties() } try { - std::map> properties; + std::map> + properties; response.read(properties); Properties wd_prop; - wd_prop.initialized = get(properties.at("Initialized")); - wd_prop.enabled = get(properties.at("Enabled")); + wd_prop.initialized = std::get(properties.at("Initialized")); + wd_prop.enabled = std::get(properties.at("Enabled")); wd_prop.expireAction = Watchdog::convertActionFromString( - get(properties.at("ExpireAction"))); + std::get(properties.at("ExpireAction"))); wd_prop.timerUse = Watchdog::convertTimerUseFromString( - get(properties.at("CurrentTimerUse"))); + std::get(properties.at("CurrentTimerUse"))); - wd_prop.interval = get(properties.at("Interval")); - wd_prop.timeRemaining = get(properties.at("TimeRemaining")); + wd_prop.interval = std::get(properties.at("Interval")); + wd_prop.timeRemaining = + std::get(properties.at("TimeRemaining")); return wd_prop; } catch (const std::exception& e) @@ -121,9 +121,9 @@ T WatchdogService::getProperty(const std::string& key) } try { - variant value; + std::variant value; response.read(value); - return get(value); + return std::get(value); } catch (const std::exception& e) { @@ -145,7 +145,7 @@ void WatchdogService::setProperty(const std::string& key, const T& val) { bool wasValid = wd_service.isValid(bus); auto request = wd_service.newMethodCall(bus, prop_intf, "Set"); - request.append(wd_intf, key, variant(val)); + request.append(wd_intf, key, std::variant(val)); auto response = bus.call(request); if (response.is_method_error()) { -- cgit v1.2.1