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: I09e19a126d456dc184fd70e82d4e4e4217fa8ee7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/handler.cpp b/tools/handler.cpp
index c3fa30c..55503b9 100644
--- a/tools/handler.cpp
+++ b/tools/handler.cpp
@@ -53,15 +53,15 @@
{
std::vector<std::string> blobs = blob->getBlobList();
- auto blobInst = std::find_if(blobs.begin(), blobs.end(),
- [&goalFirmware](const std::string& iter) {
- /* Running into weird scenarios where the string comparison doesn't
- * work. TODO: revisit.
- */
- return (0 == std::memcmp(goalFirmware.c_str(), iter.c_str(),
- goalFirmware.length()));
- // return (goalFirmware.compare(iter));
- });
+ auto blobInst = std::find_if(
+ blobs.begin(), blobs.end(), [&goalFirmware](const std::string& iter) {
+ /* Running into weird scenarios where the string comparison doesn't
+ * work. TODO: revisit.
+ */
+ return (0 == std::memcmp(goalFirmware.c_str(), iter.c_str(),
+ goalFirmware.length()));
+ // return (goalFirmware.compare(iter));
+ });
if (blobInst == blobs.end())
{
std::fprintf(stderr, "%s not found\n", goalFirmware.c_str());
@@ -84,8 +84,8 @@
}
catch (const ipmiblob::BlobException& b)
{
- throw ToolException("blob exception received: " +
- std::string(b.what()));
+ throw ToolException(
+ "blob exception received: " + std::string(b.what()));
}
catch (const ToolException& t)
{
@@ -185,8 +185,9 @@
std::vector<uint8_t> UpdateHandler::readVersion(const std::string& versionBlob)
{
- return retryIfFailed(
- [this, versionBlob]() { return retryReadVersion(versionBlob); });
+ return retryIfFailed([this, versionBlob]() {
+ return retryReadVersion(versionBlob);
+ });
}
void UpdateHandler::cleanArtifacts()