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/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()
{