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_factory.cpp b/src/trigger_factory.cpp
index 22b7ea5..d6bfa3f 100644
--- a/src/trigger_factory.cpp
+++ b/src/trigger_factory.cpp
@@ -223,10 +223,10 @@
const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const
{
const auto& sensors = getSensors(labeledSensorsInfo);
- auto triggerActions = utils::transform(triggerActionsIn,
- [](const auto& triggerActionStr) {
- return toTriggerAction(triggerActionStr);
- });
+ auto triggerActions =
+ utils::transform(triggerActionsIn, [](const auto& triggerActionStr) {
+ return toTriggerAction(triggerActionStr);
+ });
std::vector<std::shared_ptr<interfaces::Threshold>> thresholds;
auto id = std::make_unique<const std::string>(idIn);
@@ -260,8 +260,9 @@
{
auto existing = std::find_if(oldSensors.begin(), oldSensors.end(),
[labeledSensorInfo](auto sensor) {
- return labeledSensorInfo == sensor->getLabeledSensorInfo();
- });
+ return labeledSensorInfo ==
+ sensor->getLabeledSensorInfo();
+ });
if (existing != oldSensors.end())
{
@@ -281,9 +282,8 @@
currentSensors = std::move(newSensors);
}
-std::vector<LabeledSensorInfo>
- TriggerFactory::getLabeledSensorsInfo(boost::asio::yield_context& yield,
- const SensorsInfo& sensorsInfo) const
+std::vector<LabeledSensorInfo> TriggerFactory::getLabeledSensorsInfo(
+ boost::asio::yield_context& yield, const SensorsInfo& sensorsInfo) const
{
if (sensorsInfo.empty())
{
@@ -293,8 +293,8 @@
return parseSensorTree(tree, sensorsInfo);
}
-std::vector<LabeledSensorInfo>
- TriggerFactory::getLabeledSensorsInfo(const SensorsInfo& sensorsInfo) const
+std::vector<LabeledSensorInfo> TriggerFactory::getLabeledSensorsInfo(
+ const SensorsInfo& sensorsInfo) const
{
if (sensorsInfo.empty())
{
@@ -304,9 +304,8 @@
return parseSensorTree(tree, sensorsInfo);
}
-std::vector<LabeledSensorInfo>
- TriggerFactory::parseSensorTree(const std::vector<utils::SensorTree>& tree,
- const SensorsInfo& sensorsInfo)
+std::vector<LabeledSensorInfo> TriggerFactory::parseSensorTree(
+ const std::vector<utils::SensorTree>& tree, const SensorsInfo& sensorsInfo)
{
return utils::transform(sensorsInfo, [&tree](const auto& item) {
const auto& [sensorPath, metadata] = item;