sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I664c4982aa03664728d7375d78dfae6e595c2d20
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index 7e1585e..d2d3e9c 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -190,7 +190,7 @@
void PowerSupply::inventoryChanged(sdbusplus::message::message& msg)
{
std::string msgSensor;
- std::map<std::string, sdbusplus::message::variant<uint32_t, bool>> msgData;
+ std::map<std::string, std::variant<uint32_t, bool>> msgData;
msg.read(msgSensor, msgData);
// Check if it was the Present property that changed.
@@ -227,7 +227,7 @@
{
int32_t state = 0;
std::string msgSensor;
- std::map<std::string, sdbusplus::message::variant<int32_t>> msgData;
+ std::map<std::string, std::variant<int32_t>> msgData;
msg.read(msgSensor, msgData);
// Check if it was the Present property that changed.
diff --git a/utility.hpp b/utility.hpp
index 26968ec..13c6e36 100644
--- a/utility.hpp
+++ b/utility.hpp
@@ -46,7 +46,7 @@
const std::string& path, const std::string& service,
sdbusplus::bus::bus& bus, T& value)
{
- sdbusplus::message::variant<T> property;
+ std::variant<T> property;
auto method = bus.new_method_call(service.c_str(), path.c_str(),
PROPERTY_INTF, "Get");
@@ -74,7 +74,7 @@
const std::string& path, const std::string& service,
sdbusplus::bus::bus& bus, T& value)
{
- sdbusplus::message::variant<T> propertyValue(value);
+ std::variant<T> propertyValue(value);
auto method = bus.new_method_call(service.c_str(), path.c_str(),
PROPERTY_INTF, "Set");