Fixup std::variant usage
This change refactors mapbox::variant specific usage onto an API that
mapbox::variant and std::variant both support.
Tested:
Run through unit tests.
Change-Id: Ic35953b4772398495129830ed0d4455409f844ea
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/manager.cpp b/manager.cpp
index 5e05342..2342743 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -194,7 +194,9 @@
const auto& properties = associations->second;
auto assocProperty = properties.find("associations");
- auto assocValue = assocProperty->second.get<AssociationsPropertyType>();
+ auto assocValue =
+ sdbusplus::message::variant_ns::get<AssociationsPropertyType>(
+ assocProperty->second);
auto id = getEntryID(objectPath);
auto calloutNum = 0;
@@ -317,7 +319,8 @@
auto property = interface->second.find("Timestamp");
if (property != interface->second.end())
{
- return property->second.get<uint64_t>();
+ return sdbusplus::message::variant_ns::get<uint64_t>(
+ property->second);
}
}