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: I59c0a8c4b89131ecd3e9a841ed37ef3b8dcf8e9d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/biosxml.hpp b/include/biosxml.hpp
index 1936a01..ffc20ba 100644
--- a/include/biosxml.hpp
+++ b/include/biosxml.hpp
@@ -120,8 +120,7 @@
class Depex
{
public:
- Depex(std::vector<knob::knob>& knobs) : mKnobs(knobs)
- {}
+ Depex(std::vector<knob::knob>& knobs) : mKnobs(knobs) {}
/* Compute 'depex' expression of all knobs in 'biosknobs'. */
void compute()
@@ -183,7 +182,7 @@
/* Returns 'true' if the argument string is hex representation of a number.
*/
- bool isHexNotation(std::string const& s)
+ bool isHexNotation(const std::string& s)
{
return s.compare(0, 2, "0x") == 0 && s.size() > 2 &&
s.find_first_not_of("0123456789abcdefABCDEF", 2) ==
@@ -203,8 +202,8 @@
}
}
- std::string error =
- "Unable to find knob: " + variableName + " in knob list\n";
+ std::string error = "Unable to find knob: " + variableName +
+ " in knob list\n";
phosphor::logging::log<phosphor::logging::level::ERR>(error.c_str());
return false;
@@ -658,8 +657,8 @@
{
if (!getKnobs(filePath))
{
- std::string error =
- "Unable to get knobs in file: " + std::string(filePath);
+ std::string error = "Unable to get knobs in file: " +
+ std::string(filePath);
throw std::runtime_error(error);
}
}
diff --git a/include/ipmi_to_redfish_hooks.hpp b/include/ipmi_to_redfish_hooks.hpp
index 76f8b92..aefc85c 100644
--- a/include/ipmi_to_redfish_hooks.hpp
+++ b/include/ipmi_to_redfish_hooks.hpp
@@ -82,8 +82,8 @@
// Log the record as a default Redfish message instead of a SEL record
static const std::string openBMCMessageRegistryVersion("0.1");
- std::string messageID =
- "OpenBMC." + openBMCMessageRegistryVersion + ".SELEntryAdded";
+ std::string messageID = "OpenBMC." + openBMCMessageRegistryVersion +
+ ".SELEntryAdded";
std::vector<std::string> messageArgs;
messageArgs.push_back(ipmiRaw);
diff --git a/include/manufacturingcommands.hpp b/include/manufacturingcommands.hpp
index 001928a..9ff69bf 100644
--- a/include/manufacturingcommands.hpp
+++ b/include/manufacturingcommands.hpp
@@ -248,8 +248,8 @@
{
auto it = std::find_if(ledPropertyList.begin(), ledPropertyList.end(),
[&signal](const LedProperty& led) {
- return led.getSignal() == signal;
- });
+ return led.getSignal() == signal;
+ });
if (it != ledPropertyList.end())
{
return &(*it);
diff --git a/include/sdrutils.hpp b/include/sdrutils.hpp
index 4f33c52..8f1e4d5 100644
--- a/include/sdrutils.hpp
+++ b/include/sdrutils.hpp
@@ -249,10 +249,10 @@
sensorTreePtr = std::make_shared<SensorSubTree>();
- auto mapperCall =
- dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper", "GetSubTree");
+ auto mapperCall = dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper",
+ "GetSubTree");
static constexpr const auto depth = 2;
static constexpr std::array<const char*, 3> interfaces = {
"xyz.openbmc_project.Sensor.Value",
diff --git a/include/sensorutils.hpp b/include/sensorutils.hpp
index e448cee..9838798 100644
--- a/include/sensorutils.hpp
+++ b/include/sensorutils.hpp
@@ -321,8 +321,8 @@
int8_t bExp = 0;
bool bSigned = false;
- bool result =
- getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned);
+ bool result = getSensorAttributes(max, min, mValue, rExp, bValue, bExp,
+ bSigned);
if (!result)
{
throw std::runtime_error("Illegal sensor attributes");
diff --git a/include/smbiosmdrv2handler.hpp b/include/smbiosmdrv2handler.hpp
index 9bfb54f..7fd6f55 100644
--- a/include/smbiosmdrv2handler.hpp
+++ b/include/smbiosmdrv2handler.hpp
@@ -34,11 +34,11 @@
static constexpr const uint8_t maxDirEntries = 4; // Maximum directory entries
static constexpr const uint32_t mdr2SMSize =
- 0x00100000; // Size of VGA share memory
+ 0x00100000; // Size of VGA share memory
static constexpr const uint32_t mdr2SMBaseAddress =
0x9FF00000; // Base address of VGA share memory
-static constexpr const uint8_t mdrTypeII = 2; // MDR V2 type
+static constexpr const uint8_t mdrTypeII = 2; // MDR V2 type
static constexpr const uint8_t mdr2Version = 2; // MDR V2 versoin
static constexpr const uint8_t smbiosAgentVersion = 1; // Agent version of
@@ -49,15 +49,15 @@
static constexpr const int smbiosDirIndex = 0; // SMBIOS directory index
static constexpr const uint32_t smbiosTableVersion =
- 15; // Version of smbios table
+ 15; // Version of smbios table
static constexpr const uint32_t smbiosTableTimestamp =
- 0x45464748; // Time stamp when smbios table created
+ 0x45464748; // Time stamp when smbios table created
static constexpr const size_t smbiosSMMemoryOffset =
- 0; // Offset of VGA share memory
+ 0; // Offset of VGA share memory
static constexpr const size_t smbiosSMMemorySize =
1024 * 1024; // Total size of VGA share memory
static constexpr const size_t smbiosTableStorageSize =
- 64 * 1024; // Total size of smbios table
+ 64 * 1024; // Total size of smbios table
static constexpr const uint32_t defaultTimeout = 4000;
static constexpr const uint16_t sysClock = 1000;
static constexpr const int lastAgentIndex = -1;