sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I46bdb828379d72e16a95fe1bc3cb578bfdfce80c
diff --git a/occ_finder.cpp b/occ_finder.cpp
index c6926fd..3279632 100644
--- a/occ_finder.cpp
+++ b/occ_finder.cpp
@@ -47,7 +47,7 @@
elog<InternalFailure>();
}
- sdbusplus::message::variant<T> value;
+ std::variant<T> value;
reply.read(value);
return std::get<T>(value);
diff --git a/occ_pass_through.cpp b/occ_pass_through.cpp
index 9c585d0..cecad37 100644
--- a/occ_pass_through.cpp
+++ b/occ_pass_through.cpp
@@ -139,7 +139,7 @@
void PassThrough::activeStatusEvent(sdbusplus::message::message& msg)
{
std::string statusInterface;
- std::map<std::string, sdbusplus::message::variant<bool>> msgData;
+ std::map<std::string, std::variant<bool>> msgData;
msg.read(statusInterface, msgData);
auto propertyMap = msgData.find("OccActive");
diff --git a/occ_status.cpp b/occ_status.cpp
index 407b0ce..6b19b76 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -106,8 +106,7 @@
method.append(convertForMessage(Control::Host::Command::OCCReset).c_str());
// OCC Sensor ID for callout reasons
- method.append(sdbusplus::message::variant<uint8_t>(
- std::get<0>(sensorMap.at(instance))));
+ method.append(std::variant<uint8_t>(std::get<0>(sensorMap.at(instance))));
bus.call_noreply(method);
return;
}
diff --git a/powercap.cpp b/powercap.cpp
index 6f46d34..1655982 100644
--- a/powercap.cpp
+++ b/powercap.cpp
@@ -82,7 +82,7 @@
log<level::ERR>("Error in getPcap prop");
return 0;
}
- sdbusplus::message::variant<uint32_t> pcap;
+ std::variant<uint32_t> pcap;
reply.read(pcap);
return std::get<uint32_t>(pcap);
@@ -104,7 +104,7 @@
log<level::ERR>("Error in getPcapEnabled prop");
return 0;
}
- sdbusplus::message::variant<bool> pcapEnabled;
+ std::variant<bool> pcapEnabled;
reply.read(pcapEnabled);
return std::get<bool>(pcapEnabled);
@@ -173,7 +173,7 @@
bool pcapEnabled = false;
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);
// Retrieve which property changed via the msg and read the other one