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: Ib8dfa202f1d59add43fc0d55ab2bf388c8e7c877
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/libpldmresponder/bios_config.cpp b/libpldmresponder/bios_config.cpp
index e4b10c8..aea24a0 100644
--- a/libpldmresponder/bios_config.cpp
+++ b/libpldmresponder/bios_config.cpp
@@ -867,10 +867,9 @@
BIOSStringTable biosStringTable(*stringTable);
auto attrName = biosStringTable.findString(attrHeader.stringHandle);
- auto iter = std::find_if(biosAttributes.begin(), biosAttributes.end(),
- [&attrName](const auto& attr) {
- return attr->name == attrName;
- });
+ auto iter = std::find_if(
+ biosAttributes.begin(), biosAttributes.end(),
+ [&attrName](const auto& attr) { return attr->name == attrName; });
if (iter == biosAttributes.end())
{
@@ -1115,7 +1114,7 @@
PendingAttributes pendingAttributes =
std::get<PendingAttributes>(valPropMap->second);
this->constructPendingAttribute(pendingAttributes);
- });
+ });
biosAttrMatch.emplace_back(std::move(updateBIOSMatch));
}
diff --git a/libpldmresponder/bios_config.hpp b/libpldmresponder/bios_config.hpp
index d7e4b0c..77a0764 100644
--- a/libpldmresponder/bios_config.hpp
+++ b/libpldmresponder/bios_config.hpp
@@ -212,7 +212,7 @@
std::string iface;
msg.read(iface, props);
processBiosAttrChangeNotification(props, biosAttrIndex);
- }));
+ }));
biosAttrMatch.push_back(
std::make_unique<sdbusplus::bus::match_t>(
@@ -230,7 +230,7 @@
processBiosAttrChangeNotification(ifaceIt->second,
biosAttrIndex);
}
- }));
+ }));
}
}
catch (const std::exception& e)
diff --git a/libpldmresponder/pdr_utils.cpp b/libpldmresponder/pdr_utils.cpp
index 06832a1..acaedd7 100644
--- a/libpldmresponder/pdr_utils.cpp
+++ b/libpldmresponder/pdr_utils.cpp
@@ -174,8 +174,8 @@
reinterpret_cast<const state_sensor_possible_states*>(statesPtr);
PossibleStates possibleStates{};
uint8_t possibleStatesPos{};
- auto updateStates =
- [&possibleStates, &possibleStatesPos](const bitfield8_t& val) {
+ auto updateStates = [&possibleStates,
+ &possibleStatesPos](const bitfield8_t& val) {
for (int i = 0; i < CHAR_BIT; i++)
{
if (val.byte & (1 << i))
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index ad8948c..5f71252 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -75,26 +75,26 @@
// generate the PDR structures. This function iterates through the map to
// invoke all lambdas, so that all PDR types can be created.
- const std::map<Type, generatePDR>
- generateHandlers = {{PLDM_STATE_EFFECTER_PDR,
- [this](const DBusHandler& dBusIntf,
- const auto& json, RepoInterface& repo) {
+ const std::map<Type, generatePDR> generateHandlers = {
+ {PLDM_STATE_EFFECTER_PDR,
+ [this](const DBusHandler& dBusIntf, const auto& json,
+ RepoInterface& repo) {
pdr_state_effecter::generateStateEffecterPDR<pldm::utils::DBusHandler,
Handler>(dBusIntf, json,
*this, repo);
- }},
- {PLDM_NUMERIC_EFFECTER_PDR,
- [this](const DBusHandler& dBusIntf,
- const auto& json, RepoInterface& repo) {
+ }},
+ {PLDM_NUMERIC_EFFECTER_PDR,
+ [this](const DBusHandler& dBusIntf, const auto& json,
+ RepoInterface& repo) {
pdr_numeric_effecter::generateNumericEffecterPDR<
pldm::utils::DBusHandler, Handler>(dBusIntf, json, *this, repo);
- }},
+ }},
{PLDM_STATE_SENSOR_PDR, [this](const DBusHandler& dBusIntf,
const auto& json, RepoInterface& repo) {
- pdr_state_sensor::generateStateSensorPDR<pldm::utils::DBusHandler,
- Handler>(dBusIntf, json,
- *this, repo);
- }}};
+ pdr_state_sensor::generateStateSensorPDR<pldm::utils::DBusHandler,
+ Handler>(dBusIntf, json, *this,
+ repo);
+ }}};
Type pdrType{};
for (const auto& dirEntry : fs::directory_iterator(dir))