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: Ica590f8613f1fb89ab1ca676ac51c1cc7e38d67f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/sensor-monitor/threshold_alarm_logger.cpp b/sensor-monitor/threshold_alarm_logger.cpp
index 29cd229..6d78c0a 100644
--- a/sensor-monitor/threshold_alarm_logger.cpp
+++ b/sensor-monitor/threshold_alarm_logger.cpp
@@ -89,8 +89,7 @@
ThresholdAlarmLogger::ThresholdAlarmLogger(
sdbusplus::bus_t& bus, sdeventplus::Event& event,
std::shared_ptr<PowerState> powerState) :
- bus(bus),
- event(event), _powerState(std::move(powerState)),
+ bus(bus), event(event), _powerState(std::move(powerState)),
warningMatch(bus,
"type='signal',member='PropertiesChanged',"
"path_namespace='/xyz/openbmc_project/sensors',"
@@ -128,17 +127,20 @@
this, std::placeholders::_1));
// check for any currently asserted threshold alarms
- std::for_each(thresholdData.begin(), thresholdData.end(),
- [this](const auto& thresholdInterface) {
- const auto& interface = thresholdInterface.first;
- auto objects = SDBusPlus::getSubTreeRaw(this->bus, "/", interface, 0);
- std::for_each(objects.begin(), objects.end(),
- [interface, this](const auto& object) {
- const auto& path = object.first;
- const auto& service = object.second.begin()->first;
- checkThresholds(interface, path, service);
+ std::for_each(
+ thresholdData.begin(), thresholdData.end(),
+ [this](const auto& thresholdInterface) {
+ const auto& interface = thresholdInterface.first;
+ auto objects =
+ SDBusPlus::getSubTreeRaw(this->bus, "/", interface, 0);
+ std::for_each(objects.begin(), objects.end(),
+ [interface, this](const auto& object) {
+ const auto& path = object.first;
+ const auto& service =
+ object.second.begin()->first;
+ checkThresholds(interface, path, service);
+ });
});
- });
}
void ThresholdAlarmLogger::propertiesChanged(sdbusplus::message_t& msg)
@@ -262,10 +264,9 @@
}
}
-void ThresholdAlarmLogger::createEventLog(const std::string& sensorPath,
- const std::string& interface,
- const std::string& alarmProperty,
- bool alarmValue)
+void ThresholdAlarmLogger::createEventLog(
+ const std::string& sensorPath, const std::string& interface,
+ const std::string& alarmProperty, bool alarmValue)
{
std::map<std::string, std::string> ad;
@@ -332,8 +333,8 @@
try
{
- auto thresholdValue = SDBusPlus::getProperty<double>(bus, sensorPath,
- interface, name);
+ auto thresholdValue =
+ SDBusPlus::getProperty<double>(bus, sensorPath, interface, name);
ad.emplace("THRESHOLD_VALUE", std::to_string(thresholdValue));