clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I0f105c3310e87172c65a09a8787a2db5a4041cc0
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 2a06b30..7905e28 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -84,10 +84,10 @@
std::vector<std::string> getSelectedProfiles(sdbusplus::bus_t& bus)
{
std::vector<std::string> ret;
- auto mapper = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper",
- "GetSubTree");
+ auto mapper =
+ bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTree");
mapper.append("/", 0, std::array<const char*, 1>{thermalControlIface});
std::unordered_map<
std::string, std::unordered_map<std::string, std::vector<std::string>>>
@@ -281,8 +281,8 @@
auto findAttributeName = zone.find(attributeName);
if (findAttributeName != zone.end())
{
- double tmpAttributeValue = std::visit(VariantToDoubleVisitor(),
- zone.at(attributeName));
+ double tmpAttributeValue =
+ std::visit(VariantToDoubleVisitor(), zone.at(attributeName));
if (tmpAttributeValue >= 1.0)
{
value = static_cast<uint64_t>(tmpAttributeValue);
@@ -380,10 +380,10 @@
getPIDAttribute(base, "OutLimitMax"));
info.pidInfo.outLim.min = std::visit(VariantToDoubleVisitor(),
getPIDAttribute(base, "OutLimitMin"));
- info.pidInfo.slewNeg = std::visit(VariantToDoubleVisitor(),
- getPIDAttribute(base, "SlewNeg"));
- info.pidInfo.slewPos = std::visit(VariantToDoubleVisitor(),
- getPIDAttribute(base, "SlewPos"));
+ info.pidInfo.slewNeg =
+ std::visit(VariantToDoubleVisitor(), getPIDAttribute(base, "SlewNeg"));
+ info.pidInfo.slewPos =
+ std::visit(VariantToDoubleVisitor(), getPIDAttribute(base, "SlewPos"));
bool checkHysterWithSetpt = false;
double negativeHysteresis = 0;
@@ -401,18 +401,18 @@
}
if (findNeg != base.end())
{
- negativeHysteresis = std::visit(VariantToDoubleVisitor(),
- findNeg->second);
+ negativeHysteresis =
+ std::visit(VariantToDoubleVisitor(), findNeg->second);
}
if (findPos != base.end())
{
- positiveHysteresis = std::visit(VariantToDoubleVisitor(),
- findPos->second);
+ positiveHysteresis =
+ std::visit(VariantToDoubleVisitor(), findPos->second);
}
if (findDerivative != base.end())
{
- derivativeCoeff = std::visit(VariantToDoubleVisitor(),
- findDerivative->second);
+ derivativeCoeff =
+ std::visit(VariantToDoubleVisitor(), findDerivative->second);
}
info.pidInfo.checkHysterWithSetpt = checkHysterWithSetpt;
@@ -432,16 +432,16 @@
createMatches(bus, timer);
- auto mapper = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper",
- "GetSubTree");
- mapper.append("/", 0,
- std::array<const char*, 6>{
- objectManagerInterface, pidConfigurationInterface,
- pidZoneConfigurationInterface,
- stepwiseConfigurationInterface, sensorInterface,
- defaultPwmInterface});
+ auto mapper =
+ bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTree");
+ mapper.append(
+ "/", 0,
+ std::array<const char*, 6>{
+ objectManagerInterface, pidConfigurationInterface,
+ pidZoneConfigurationInterface, stepwiseConfigurationInterface,
+ sensorInterface, defaultPwmInterface});
std::unordered_map<
std::string, std::unordered_map<std::string, std::vector<std::string>>>
respData;
@@ -516,8 +516,8 @@
catch (const sdbusplus::exception_t&)
{
// this shouldn't happen, probably means daemon crashed
- throw std::runtime_error("Error getting managed objects from " +
- owner.first);
+ throw std::runtime_error(
+ "Error getting managed objects from " + owner.first);
}
for (auto& pathPair : configuration)
@@ -562,8 +562,8 @@
for (const std::string& profile : profiles)
{
if (std::find(selectedProfiles.begin(),
- selectedProfiles.end(),
- profile) != selectedProfiles.end())
+ selectedProfiles.end(), profile) !=
+ selectedProfiles.end())
{
found = true;
break;
@@ -908,11 +908,11 @@
offsetType =
std::get<std::string>(findSetpointOffset->second);
if (std::find(thresholds::types.begin(),
- thresholds::types.end(),
- offsetType) == thresholds::types.end())
+ thresholds::types.end(), offsetType) ==
+ thresholds::types.end())
{
- throw std::runtime_error("Unsupported type: " +
- offsetType);
+ throw std::runtime_error(
+ "Unsupported type: " + offsetType);
}
}