Consistently name AsyncResp variables
In about half of our code, AsyncResp objects take the name asyncResp,
and in the other half they take the name aResp. While the difference
between them is negligeble and arbitrary, having two naming conventions
makes it more difficult to do automated changes over time via grep.
This commit was generated automtatically with the command:
git grep -l 'aResp' | xargs sed -i 's|aResp|asyncResp|g'
Tested: Code compiles.
Change-Id: Id363437b6a78f51e91cbf60aa0a0c2286f36a037
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 3d58d0d..9cd67cd 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -854,24 +854,26 @@
}
/* Fill related item links (i.e. bmc, bios) in for inventory */
inline static void
- getRelatedItems(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+ getRelatedItems(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& purpose)
{
if (purpose == sw_util::bmcPurpose)
{
- nlohmann::json& relatedItem = aResp->res.jsonValue["RelatedItem"];
+ nlohmann::json& relatedItem = asyncResp->res.jsonValue["RelatedItem"];
nlohmann::json::object_t item;
item["@odata.id"] = "/redfish/v1/Managers/bmc";
relatedItem.emplace_back(std::move(item));
- aResp->res.jsonValue["RelatedItem@odata.count"] = relatedItem.size();
+ asyncResp->res.jsonValue["RelatedItem@odata.count"] =
+ relatedItem.size();
}
else if (purpose == sw_util::biosPurpose)
{
- nlohmann::json& relatedItem = aResp->res.jsonValue["RelatedItem"];
+ nlohmann::json& relatedItem = asyncResp->res.jsonValue["RelatedItem"];
nlohmann::json::object_t item;
item["@odata.id"] = "/redfish/v1/Systems/system/Bios";
relatedItem.emplace_back(std::move(item));
- aResp->res.jsonValue["RelatedItem@odata.count"] = relatedItem.size();
+ asyncResp->res.jsonValue["RelatedItem@odata.count"] =
+ relatedItem.size();
}
else
{