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: I2b9626d95674508bb090745de6471fe2755c89fd
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/item_updater.cpp b/item_updater.cpp
index fad8c21..e2282f7 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -144,7 +144,7 @@
{
result = ItemUpdater::ActivationStatus::ready;
}
- AssociationList associations = {};
+ AssociationList associations;
if (result == ItemUpdater::ActivationStatus::ready)
{
@@ -161,8 +161,8 @@
std::bind(&ItemUpdater::erase, this, std::placeholders::_1),
versionId);
versionPtr->deleteObject =
- std::make_unique<phosphor::software::manager::Delete>(bus, path,
- *versionPtr);
+ std::make_unique<phosphor::software::manager::Delete>(
+ bus, path, *versionPtr);
versions.insert(std::make_pair(versionId, std::move(versionPtr)));
activations.insert(std::make_pair(
@@ -293,7 +293,7 @@
}
}
- AssociationList associations = {};
+ AssociationList associations;
if (activationState == server::Activation::Activations::Active)
{
@@ -382,8 +382,8 @@
// create rofs-<versionId>-functional under MEDIA_DIR, then call again
// processBMCImage() to create the D-Bus interface for it.
auto version = VersionClass::getBMCVersion(OS_RELEASE_FILE);
- auto id = phosphor::software::manager::Version::getId(version +
- functionalSuffix);
+ auto id = phosphor::software::manager::Version::getId(
+ version + functionalSuffix);
auto versionFileDir = BMC_ROFS_PREFIX + id + functionalSuffix + "/etc/";
try
{
@@ -391,8 +391,8 @@
{
fs::create_directories(versionFileDir);
}
- auto versionFilePath = BMC_ROFS_PREFIX + id + functionalSuffix +
- OS_RELEASE_FILE;
+ auto versionFilePath =
+ BMC_ROFS_PREFIX + id + functionalSuffix + OS_RELEASE_FILE;
fs::create_directory_symlink(OS_RELEASE_FILE, versionFilePath);
ItemUpdater::processBMCImage();
}
@@ -536,8 +536,8 @@
cmpPriority cmpPriorityFunc =
[](const std::pair<std::string, uint8_t>& priority1,
const std::pair<std::string, uint8_t>& priority2) {
- return priority1.second <= priority2.second;
- };
+ return priority1.second <= priority2.second;
+ };
// Sort versions by ascending priority
std::set<std::pair<std::string, uint8_t>, cmpPriority> prioritySet(
@@ -618,8 +618,8 @@
// The fieldmode u-boot environment variable may not exist since it is not
// part of the default environment, run fw_printenv with 2>&1 to ignore the
// error message in the journal "Error: "fieldmode" not defined"
- std::pair<int, std::string> ret = utils::execute("/sbin/fw_printenv", "-n",
- "fieldmode", "2>&1");
+ std::pair<int, std::string> ret =
+ utils::execute("/sbin/fw_printenv", "-n", "fieldmode", "2>&1");
if (ret.first != 0)
{
@@ -873,7 +873,7 @@
auto versionId = path.substr(pos + 1);
auto version = "null";
- AssociationList assocs = {};
+ AssociationList assocs;
biosActivation = std::make_unique<Activation>(
bus, path, *this, versionId, server::Activation::Activations::Active,
assocs);
@@ -885,8 +885,8 @@
std::vector<std::string>(),
std::bind(dummyErase, std::placeholders::_1), "");
biosVersion->deleteObject =
- std::make_unique<phosphor::software::manager::Delete>(bus, path,
- *biosVersion);
+ std::make_unique<phosphor::software::manager::Delete>(
+ bus, path, *biosVersion);
}
#endif