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: I152f141a5e8343b92b5ce81d3ca16eec77b5606b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/presence/anyof.cpp b/presence/anyof.cpp
index 54a0ec0..6b9403a 100644
--- a/presence/anyof.cpp
+++ b/presence/anyof.cpp
@@ -62,10 +62,10 @@
void AnyOf::stateChanged(bool present, PresenceSensor& sensor)
{
// Find the sensor that changed state.
- auto sit =
- std::find_if(state.begin(), state.end(), [&sensor](const auto& s) {
- return std::get<sensorPos>(s).get() == sensor;
- });
+ auto sit = std::find_if(state.begin(), state.end(),
+ [&sensor](const auto& s) {
+ return std::get<sensorPos>(s).get() == sensor;
+ });
if (sit != state.end())
{
auto origState =
diff --git a/presence/error_reporter.cpp b/presence/error_reporter.cpp
index 6210f7d..1b46bdf 100644
--- a/presence/error_reporter.cpp
+++ b/presence/error_reporter.cpp
@@ -200,9 +200,10 @@
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)
{
@@ -211,9 +212,10 @@
}
}
- 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/gpio.hpp b/presence/gpio.hpp
index fc650ca..ecd31a8 100644
--- a/presence/gpio.hpp
+++ b/presence/gpio.hpp
@@ -141,8 +141,7 @@
*
* Required to conform to interface
*/
- void stop() override
- {}
+ void stop() override {}
/**
* @brief Check the sensor.
@@ -159,8 +158,7 @@
*
* @param[in] fanInventoryPath - The fan inventory D-Bus object path.
*/
- void logConflict(const std::string& /*fanInventoryPath*/) const override
- {}
+ void logConflict(const std::string& /*fanInventoryPath*/) const override {}
private:
/**
diff --git a/presence/json_parser.cpp b/presence/json_parser.cpp
index dbdc54b..5de827d 100644
--- a/presence/json_parser.cpp
+++ b/presence/json_parser.cpp
@@ -52,8 +52,7 @@
const auto loggingPath = "/xyz/openbmc_project/logging";
const auto loggingCreateIface = "xyz.openbmc_project.Logging.Create";
-JsonConfig::JsonConfig(sdbusplus::bus_t& bus) : _bus(bus)
-{}
+JsonConfig::JsonConfig(sdbusplus::bus_t& bus) : _bus(bus) {}
void JsonConfig::start()
{
@@ -191,14 +190,14 @@
eeprom["bind_delay_ms"].get<size_t>());
}
- auto fan =
- std::make_tuple(member["name"], member["path"], timeUntilError);
+ auto fan = std::make_tuple(member["name"], member["path"],
+ timeUntilError);
// Create a fan object
fans.emplace_back(std::make_tuple(fan, std::move(sensors)));
// Add fan presence policy
- auto policy =
- getPolicy(member["rpolicy"], fans.back(), std::move(eepromDevice));
+ auto policy = getPolicy(member["rpolicy"], fans.back(),
+ std::move(eepromDevice));
if (policy)
{
policies.emplace_back(std::move(policy));
@@ -325,7 +324,6 @@
try
{
-
util::SDBusPlus::lookupAndCallMethod(
loggingPath, loggingCreateIface, "Create",
"xyz.openbmc_project.Fan.Presence.Error.GPIODeviceUnavailable",
diff --git a/presence/psensor.hpp b/presence/psensor.hpp
index cc65fe0..d73be56 100644
--- a/presence/psensor.hpp
+++ b/presence/psensor.hpp
@@ -74,8 +74,7 @@
*
* Provide a default noop implementation.
*/
- virtual void fail()
- {}
+ virtual void fail() {}
friend bool operator==(const PresenceSensor& l, const PresenceSensor& r);