clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Ic2bc1d98d8ad469a3477f9059ec890fc8339907d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/trigger_manager.cpp b/src/trigger_manager.cpp
index 5cc824e..f65b120 100644
--- a/src/trigger_manager.cpp
+++ b/src/trigger_manager.cpp
@@ -23,42 +23,45 @@
managerIface = objServer->add_unique_interface(
triggerManagerPath, triggerManagerIfaceName, [this](auto& iface) {
- iface.register_method(
- "AddTrigger",
- [this](
- boost::asio::yield_context& yield, const std::string& id,
- const std::string& name,
- const std::vector<std::string>& triggerActions,
- const SensorsInfo& sensors,
- const std::vector<sdbusplus::message::object_path>& reports,
- const std::vector<numeric::ThresholdParam>& numericThresholds,
- const std::vector<discrete::ThresholdParam>&
- discreteThresholds) {
- LabeledTriggerThresholdParams labeledTriggerThresholdParams;
- if (!numericThresholds.empty())
- {
- labeledTriggerThresholdParams =
- utils::ToLabeledThresholdParamConversion()(
- numericThresholds);
- }
- if (!discreteThresholds.empty())
- {
- labeledTriggerThresholdParams =
- utils::ToLabeledThresholdParamConversion()(
- discreteThresholds);
- }
- std::vector<LabeledSensorInfo> labeledSensorsInfo =
- triggerFactory->getLabeledSensorsInfo(yield, sensors);
+ iface.register_method(
+ "AddTrigger",
+ [this](
+ boost::asio::yield_context& yield, const std::string& id,
+ const std::string& name,
+ const std::vector<std::string>& triggerActions,
+ const SensorsInfo& sensors,
+ const std::vector<sdbusplus::message::object_path>& reports,
+ const std::vector<numeric::ThresholdParam>&
+ numericThresholds,
+ const std::vector<discrete::ThresholdParam>&
+ discreteThresholds) {
+ LabeledTriggerThresholdParams labeledTriggerThresholdParams;
+ if (!numericThresholds.empty())
+ {
+ labeledTriggerThresholdParams =
+ utils::ToLabeledThresholdParamConversion()(
+ numericThresholds);
+ }
+ if (!discreteThresholds.empty())
+ {
+ labeledTriggerThresholdParams =
+ utils::ToLabeledThresholdParamConversion()(
+ discreteThresholds);
+ }
+ std::vector<LabeledSensorInfo> labeledSensorsInfo =
+ triggerFactory->getLabeledSensorsInfo(yield, sensors);
- auto reportIds = utils::transform<std::vector>(
- reports,
- [](const auto& item) { return utils::reportPathToId(item); });
+ auto reportIds = utils::transform<std::vector>(
+ reports, [](const auto& item) {
+ return utils::reportPathToId(item);
+ });
- return addTrigger(id, name, triggerActions, labeledSensorsInfo,
- reportIds, labeledTriggerThresholdParams)
- .getPath();
+ return addTrigger(id, name, triggerActions,
+ labeledSensorsInfo, reportIds,
+ labeledTriggerThresholdParams)
+ .getPath();
+ });
});
- });
}
void TriggerManager::removeTrigger(const interfaces::Trigger* trigger)