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: I152f141a5e8343b92b5ce81d3ca16eec77b5606b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/control/json/actions/timer_based_actions.cpp b/control/json/actions/timer_based_actions.cpp
index dd5f5ce..e3f3fec 100644
--- a/control/json/actions/timer_based_actions.cpp
+++ b/control/json/actions/timer_based_actions.cpp
@@ -43,10 +43,10 @@
{
// If any of groups' value == nullopt(i.e. not configured), action is
// driven by the service owned state of the group members
- _byOwner =
- std::any_of(_groups.begin(), _groups.end(), [](const auto& group) {
- return group.getValue() == std::nullopt;
- });
+ _byOwner = std::any_of(_groups.begin(), _groups.end(),
+ [](const auto& group) {
+ return group.getValue() == std::nullopt;
+ });
setTimerConf(jsonObj);
setActions(jsonObj);
@@ -62,9 +62,8 @@
const auto& members = group.getMembers();
return std::any_of(members.begin(), members.end(),
[&group](const auto& member) {
- return !Manager::hasOwner(
- member, group.getInterface());
- });
+ return !Manager::hasOwner(member, group.getInterface());
+ });
}))
{
startTimer();
@@ -80,18 +79,16 @@
// If all group members have a given value and it matches what's
// in the cache, start timer and if any do not match, stop
// timer.
- if (std::all_of(
- _groups.begin(), _groups.end(), [&mgr](const auto& group) {
- const auto& members = group.getMembers();
- return std::all_of(members.begin(), members.end(),
- [&mgr, &group](const auto& member) {
- return group.getValue() ==
- mgr->getProperty(
- member,
- group.getInterface(),
- group.getProperty());
- });
- }))
+ if (std::all_of(_groups.begin(), _groups.end(),
+ [&mgr](const auto& group) {
+ const auto& members = group.getMembers();
+ return std::all_of(members.begin(), members.end(),
+ [&mgr, &group](const auto& member) {
+ return group.getValue() ==
+ mgr->getProperty(member, group.getInterface(),
+ group.getProperty());
+ });
+ }))
{
// Timer will be started(and never stopped) when _groups is empty
startTimer();
@@ -148,8 +145,8 @@
// Add zone to _actions
std::for_each(_actions.begin(), _actions.end(),
[&zone](std::unique_ptr<ActionBase>& action) {
- action->addZone(zone);
- });
+ action->addZone(zone);
+ });
}
}