use sdbusplus unpack syntax
Rather than defining a variable and then reading it from a message,
sdbusplus also supports directly unpack-ing from the message. Use
this syntax instead as it is more efficient and succinct.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I59592f2ee8087b2f144b91832ce69957c12395e5
diff --git a/utility.cpp b/utility.cpp
index bcfc35e..ee49dcc 100644
--- a/utility.cpp
+++ b/utility.cpp
@@ -39,8 +39,8 @@
auto reply = bus.call(method);
- std::map<std::string, std::vector<std::string>> response;
- reply.read(response);
+ auto response =
+ reply.unpack<std::map<std::string, std::vector<std::string>>>();
if (response.empty())
{