clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I8c84201cb2343a8c8a5507a49de0721a1bee7063
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/pldmtool/pldm_fw_update_cmd.cpp b/pldmtool/pldm_fw_update_cmd.cpp
index 25ab259..cfd4608 100644
--- a/pldmtool/pldm_fw_update_cmd.cpp
+++ b/pldmtool/pldm_fw_update_cmd.cpp
@@ -86,8 +86,8 @@
std::pair<int, std::vector<uint8_t>> createRequestMsg() override
{
- std::vector<uint8_t> requestMsg(sizeof(pldm_msg_hdr) +
- PLDM_GET_STATUS_REQ_BYTES);
+ std::vector<uint8_t> requestMsg(
+ sizeof(pldm_msg_hdr) + PLDM_GET_STATUS_REQ_BYTES);
auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
auto rc = encode_get_status_req(instanceId, request,
PLDM_GET_STATUS_REQ_BYTES);
@@ -176,8 +176,8 @@
std::pair<int, std::vector<uint8_t>> createRequestMsg() override
{
- std::vector<uint8_t> requestMsg(sizeof(pldm_msg_hdr) +
- PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES);
+ std::vector<uint8_t> requestMsg(
+ sizeof(pldm_msg_hdr) + PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES);
auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
auto rc = encode_get_firmware_parameters_req(
instanceId, PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES, request);
@@ -397,9 +397,9 @@
compParamPtr += sizeof(pldm_component_parameter_entry) +
activeCompVerStr.length + pendingCompVerStr.length;
- compParamTableLen -= sizeof(pldm_component_parameter_entry) +
- activeCompVerStr.length +
- pendingCompVerStr.length;
+ compParamTableLen -=
+ sizeof(pldm_component_parameter_entry) +
+ activeCompVerStr.length + pendingCompVerStr.length;
compDataEntries.push_back(compData);
}
data["ComponentParameterEntries"] = compDataEntries;
@@ -493,9 +493,9 @@
}
}
// Entry is not present, add type and value to json response
- ordered_json descriptor =
- ordered_json::object({{"Type", descriptorName.at(descriptorType)},
- {"Value", ordered_json::array()}});
+ ordered_json descriptor = ordered_json::object(
+ {{"Type", descriptorName.at(descriptorType)},
+ {"Value", ordered_json::array()}});
if (descriptorType != PLDM_FWUP_VENDOR_DEFINED)
{
descriptor["Value"].emplace_back(descDataStream.str());
@@ -517,8 +517,8 @@
}
std::pair<int, std::vector<uint8_t>> QueryDeviceIdentifiers::createRequestMsg()
{
- std::vector<uint8_t> requestMsg(sizeof(pldm_msg_hdr) +
- PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES);
+ std::vector<uint8_t> requestMsg(
+ sizeof(pldm_msg_hdr) + PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES);
auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
auto rc = encode_query_device_identifiers_req(
instanceId, PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES, request);
@@ -613,8 +613,8 @@
void registerCommand(CLI::App& app)
{
- auto fwUpdate = app.add_subcommand("fw_update",
- "firmware update type commands");
+ auto fwUpdate =
+ app.add_subcommand("fw_update", "firmware update type commands");
fwUpdate->require_subcommand(1);
auto getStatus = fwUpdate->add_subcommand("GetStatus", "Status of the FD");