clang-format: copy latest and re-format
clang-format-17 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: I3e9e6350864ac267819a4b8d670bef7d3746976e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/presence/error_reporter.cpp b/presence/error_reporter.cpp
index 790a260..b095717 100644
--- a/presence/error_reporter.cpp
+++ b/presence/error_reporter.cpp
@@ -201,10 +201,9 @@
if (powerState)
{
// If there are fans already missing, log it.
- auto missing = std::count_if(_fanStates.begin(), _fanStates.end(),
- [](const auto& fanState) {
- return fanState.second == false;
- });
+ auto missing = std::count_if(
+ _fanStates.begin(), _fanStates.end(),
+ [](const auto& fanState) { return fanState.second == false; });
if (missing)
{
@@ -213,10 +212,9 @@
}
}
- std::for_each(_fanStates.begin(), _fanStates.end(),
- [this](const auto& fanState) {
- this->checkFan(fanState.first);
- });
+ std::for_each(
+ _fanStates.begin(), _fanStates.end(),
+ [this](const auto& fanState) { this->checkFan(fanState.first); });
}
} // namespace phosphor::fan::presence
diff --git a/presence/json_parser.cpp b/presence/json_parser.cpp
index 70cac08..ea1d496 100644
--- a/presence/json_parser.cpp
+++ b/presence/json_parser.cpp
@@ -213,9 +213,9 @@
// Create the error reporter class if necessary
if (std::any_of(_fans.begin(), _fans.end(), [](const auto& fan) {
- return std::get<std::optional<size_t>>(std::get<Fan>(fan)) !=
- std::nullopt;
- }))
+ return std::get<std::optional<size_t>>(std::get<Fan>(fan)) !=
+ std::nullopt;
+ }))
{
_reporter = std::make_unique<ErrorReporter>(_bus, _fans);
}