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: I44441096113929ce96eb1439e2932e6ff3c87f27
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/whitelist-filter.cpp b/whitelist-filter.cpp
index dfd2a19..7092096 100644
--- a/whitelist-filter.cpp
+++ b/whitelist-filter.cpp
@@ -1,5 +1,3 @@
-#include <algorithm>
-#include <array>
#include <ipmid/api.hpp>
#include <ipmid/utils.hpp>
#include <ipmiwhitelist.hpp>
@@ -8,6 +6,9 @@
#include <settings.hpp>
#include <xyz/openbmc_project/Control/Security/RestrictionMode/server.hpp>
+#include <algorithm>
+#include <array>
+
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
@@ -28,9 +29,9 @@
public:
WhitelistFilter();
~WhitelistFilter() = default;
- WhitelistFilter(WhitelistFilter const&) = delete;
+ WhitelistFilter(const WhitelistFilter&) = delete;
WhitelistFilter(WhitelistFilter&&) = delete;
- WhitelistFilter& operator=(WhitelistFilter const&) = delete;
+ WhitelistFilter& operator=(const WhitelistFilter&) = delete;
WhitelistFilter& operator=(WhitelistFilter&&) = delete;
private:
@@ -57,8 +58,8 @@
log<level::INFO>("Loading whitelist filter");
ipmi::registerFilter(ipmi::prioOpenBmcBase,
[this](ipmi::message::Request::ptr request) {
- return filterMessage(request);
- });
+ return filterMessage(request);
+ });
// wait until io->run is going to fetch RestrictionMode
post_work([this]() { postInit(); });
@@ -82,8 +83,8 @@
try
{
restrictionModeSetting = dev;
- restrictionModeService =
- objects->service(restrictionModeSetting, restrictionModeIntf);
+ restrictionModeService = objects->service(restrictionModeSetting,
+ restrictionModeIntf);
}
catch (const std::out_of_range& e)
{
@@ -95,24 +96,24 @@
bus->async_method_call(
[this, index = std::distance(&*std::begin(devices), &dev)](
boost::system::error_code ec, ipmi::Value v) {
- if (ec)
- {
- log<level::ERR>("Error in RestrictionMode Get");
- // Fail-safe to true.
- restrictedMode[index] = true;
- return;
- }
+ if (ec)
+ {
+ log<level::ERR>("Error in RestrictionMode Get");
+ // Fail-safe to true.
+ restrictedMode[index] = true;
+ return;
+ }
- auto mode = std::get<std::string>(v);
- auto restrictionMode =
- RestrictionMode::convertModesFromString(mode);
+ auto mode = std::get<std::string>(v);
+ auto restrictionMode =
+ RestrictionMode::convertModesFromString(mode);
- bool restrictMode =
- (restrictionMode == RestrictionMode::Modes::Whitelist);
- restrictedMode.emplace_back(restrictMode);
+ bool restrictMode =
+ (restrictionMode == RestrictionMode::Modes::Whitelist);
+ restrictedMode.emplace_back(restrictMode);
- log<level::INFO>((restrictMode ? "Set restrictedMode = true"
- : "Set restrictedMode = false"));
+ log<level::INFO>((restrictMode ? "Set restrictedMode = true"
+ : "Set restrictedMode = false"));
},
restrictionModeService, restrictionModeSetting,
"org.freedesktop.DBus.Properties", "Get", restrictionModeIntf,