clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I4530f5b9df4f5898e26a2eef7efcf82e9728197f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/static/activation_static.cpp b/static/activation_static.cpp
index 9b451cf..d4f8329 100644
--- a/static/activation_static.cpp
+++ b/static/activation_static.cpp
@@ -16,7 +16,6 @@
auto ActivationStatic::activation(Activations value) -> Activations
{
-
auto ret = value;
if (value != softwareServer::Activation::Activations::Active)
{
@@ -99,8 +98,8 @@
std::replace(pnorFileEscaped.begin(), pnorFileEscaped.end(), '/', '-');
constexpr auto updatePNORService = "openpower-pnor-update@";
- pnorUpdateUnit =
- std::string(updatePNORService) + pnorFileEscaped + ".service";
+ pnorUpdateUnit = std::string(updatePNORService) + pnorFileEscaped +
+ ".service";
auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
SYSTEMD_INTERFACE, "StartUnit");
method.append(pnorUpdateUnit, "replace");
@@ -140,8 +139,8 @@
// Set Redundancy Priority before setting to Active
if (!redundancyPriority)
{
- redundancyPriority =
- std::make_unique<RedundancyPriority>(bus, path, *this, 0);
+ redundancyPriority = std::make_unique<RedundancyPriority>(bus, path,
+ *this, 0);
}
activationProgress->progress(100);
diff --git a/static/item_updater_static.cpp b/static/item_updater_static.cpp
index 8eea808..630e8ae 100644
--- a/static/item_updater_static.cpp
+++ b/static/item_updater_static.cpp
@@ -29,7 +29,7 @@
{
template <typename... Ts>
-std::string concat_string(Ts const&... ts)
+std::string concat_string(const Ts&... ts)
{
std::stringstream s;
((s << ts << " "), ...) << std::endl;
@@ -39,7 +39,7 @@
// Helper function to run pflash command
// Returns return code and the stdout
template <typename... Ts>
-std::pair<int, std::string> pflash(Ts const&... ts)
+std::pair<int, std::string> pflash(const Ts&... ts)
{
std::array<char, 512> buffer;
std::string cmd = concat_string("pflash", ts...);
@@ -79,8 +79,8 @@
fs::path versionFile = tmpDir;
versionFile /= "version";
- auto [rc, r] =
- pflash("-P VERSION -r", versionFile.string(), "2>&1 > /dev/null");
+ auto [rc, r] = pflash("-P VERSION -r", versionFile.string(),
+ "2>&1 > /dev/null");
if (rc != 0)
{
log<level::ERR>("Failed to read VERSION", entry("RETURNCODE=%d", rc));
@@ -162,14 +162,14 @@
{
continue;
}
- line = line.substr(pos); // Skiping "ID=xx"
+ line = line.substr(pos); // Skiping "ID=xx"
pos = line.find_first_not_of(' '); // After spaces
if (pos == std::string::npos)
{
continue;
}
- line = line.substr(pos); // Skipping spaces
+ line = line.substr(pos); // Skipping spaces
pos = line.find_first_of(' '); // The end of part name
if (pos == std::string::npos)
@@ -326,8 +326,7 @@
return versionId == functionalVersionId;
}
-void ItemUpdaterStatic::freePriority(uint8_t, const std::string&)
-{}
+void ItemUpdaterStatic::freePriority(uint8_t, const std::string&) {}
void ItemUpdaterStatic::deleteAll()
{