EntityManager: Destructure board properties in postToDbus()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ib88c258ff524e0389e2cf39d91a87739bb22ac6f
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 054307f..655f7f7 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -616,17 +616,17 @@
boardIface, boardValues, objServer);
jsonPointerPath += "/";
// iterate through board properties
- for (auto& boardField : boardValues.items())
+ for (auto& [propName, propValue] : boardValues.items())
{
- if (boardField.value().type() == nlohmann::json::value_t::object)
+ if (propValue.type() == nlohmann::json::value_t::object)
{
std::shared_ptr<sdbusplus::asio::dbus_interface> iface =
- createInterface(objServer, boardName, boardField.key(),
+ createInterface(objServer, boardName, propName,
boardKeyOrig);
populateInterfaceFromJson(systemConfiguration,
- jsonPointerPath + boardField.key(),
- iface, boardField.value(), objServer);
+ jsonPointerPath + propName, iface,
+ propValue, objServer);
}
}