summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2019-04-09 11:44:36 -0700
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-04-18 22:40:32 +0000
commitf442e119aed2dc87f320bf230ad39e7dc5c72524 (patch)
treefe834d199e48249934b3c84aa92db536aea3ef25 /app
parent5b2535f89023d0ea220ccc24200a9b51c142c08d (diff)
downloadphosphor-host-ipmid-f442e119aed2dc87f320bf230ad39e7dc5c72524.zip
phosphor-host-ipmid-f442e119aed2dc87f320bf230ad39e7dc5c72524.tar.gz
move variant to std namespaceHEADmaster
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 <vernon.mauery@linux.intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/watchdog_service.cpp24
1 files changed, 12 insertions, 12 deletions
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<std::string, variant<bool, uint64_t, std::string>> properties;
+ std::map<std::string, std::variant<bool, uint64_t, std::string>>
+ properties;
response.read(properties);
Properties wd_prop;
- wd_prop.initialized = get<bool>(properties.at("Initialized"));
- wd_prop.enabled = get<bool>(properties.at("Enabled"));
+ wd_prop.initialized = std::get<bool>(properties.at("Initialized"));
+ wd_prop.enabled = std::get<bool>(properties.at("Enabled"));
wd_prop.expireAction = Watchdog::convertActionFromString(
- get<std::string>(properties.at("ExpireAction")));
+ std::get<std::string>(properties.at("ExpireAction")));
wd_prop.timerUse = Watchdog::convertTimerUseFromString(
- get<std::string>(properties.at("CurrentTimerUse")));
+ std::get<std::string>(properties.at("CurrentTimerUse")));
- wd_prop.interval = get<uint64_t>(properties.at("Interval"));
- wd_prop.timeRemaining = get<uint64_t>(properties.at("TimeRemaining"));
+ wd_prop.interval = std::get<uint64_t>(properties.at("Interval"));
+ wd_prop.timeRemaining =
+ std::get<uint64_t>(properties.at("TimeRemaining"));
return wd_prop;
}
catch (const std::exception& e)
@@ -121,9 +121,9 @@ T WatchdogService::getProperty(const std::string& key)
}
try
{
- variant<T> value;
+ std::variant<T> value;
response.read(value);
- return get<T>(value);
+ return std::get<T>(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<T>(val));
+ request.append(wd_intf, key, std::variant<T>(val));
auto response = bus.call(request);
if (response.is_method_error())
{
OpenPOWER on IntegriCloud