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/control/json/triggers/handlers.hpp b/control/json/triggers/handlers.hpp
index 8e8595f..a263295 100644
--- a/control/json/triggers/handlers.hpp
+++ b/control/json/triggers/handlers.hpp
@@ -112,8 +112,8 @@
std::vector<std::string> intfs;
msg.read(intfs);
- auto itIntf = std::find(intfs.begin(), intfs.end(),
- std::get<Intf>(obj));
+ auto itIntf =
+ std::find(intfs.begin(), intfs.end(), std::get<Intf>(obj));
if (itIntf == intfs.cend())
{
// Object's interface not in list of interfaces removed
diff --git a/control/json/triggers/init.cpp b/control/json/triggers/init.cpp
index bd557d7..3d9a535 100644
--- a/control/json/triggers/init.cpp
+++ b/control/json/triggers/init.cpp
@@ -162,8 +162,8 @@
auto availMethods = std::accumulate(
std::next(methods.begin()), methods.end(),
methods.begin()->first, [](auto list, auto method) {
- return std::move(list) + ", " + method.first;
- });
+ return std::move(list) + ", " + method.first;
+ });
auto msg =
std::format("Event '{}' requires a supported method given to "
"be init driven, available methods: {}",
diff --git a/control/json/triggers/signal.cpp b/control/json/triggers/signal.cpp
index 537ef50..c0641d9 100644
--- a/control/json/triggers/signal.cpp
+++ b/control/json/triggers/signal.cpp
@@ -100,13 +100,13 @@
{
// Setup property changed signal handler on the group member's
// property
- const auto match = rules::propertiesChanged(member,
- group.getInterface());
- SignalPkg signalPkg = {Handlers::propertiesChanged,
- SignalObject(std::cref(member),
- std::cref(group.getInterface()),
- std::cref(group.getProperty())),
- actions};
+ const auto match =
+ rules::propertiesChanged(member, group.getInterface());
+ SignalPkg signalPkg = {
+ Handlers::propertiesChanged,
+ SignalObject(std::cref(member), std::cref(group.getInterface()),
+ std::cref(group.getProperty())),
+ actions};
auto isSameSig = [&prop = group.getProperty()](SignalPkg& pkg) {
auto& obj = std::get<SignalObject>(pkg);
return prop == std::get<Prop>(obj);
@@ -124,13 +124,13 @@
for (const auto& member : group.getMembers())
{
// Setup interfaces added signal handler on the group member
- const auto match = rules::interfacesAdded() +
- rules::argNpath(0, member);
- SignalPkg signalPkg = {Handlers::interfacesAdded,
- SignalObject(std::cref(member),
- std::cref(group.getInterface()),
- std::cref(group.getProperty())),
- actions};
+ const auto match =
+ rules::interfacesAdded() + rules::argNpath(0, member);
+ SignalPkg signalPkg = {
+ Handlers::interfacesAdded,
+ SignalObject(std::cref(member), std::cref(group.getInterface()),
+ std::cref(group.getProperty())),
+ actions};
auto isSameSig = [&intf = group.getInterface()](SignalPkg& pkg) {
auto& obj = std::get<SignalObject>(pkg);
return intf == std::get<Intf>(obj);
@@ -148,13 +148,13 @@
for (const auto& member : group.getMembers())
{
// Setup interfaces removed signal handler on the group member
- const auto match = rules::interfacesRemoved() +
- rules::argNpath(0, member);
- SignalPkg signalPkg = {Handlers::interfacesRemoved,
- SignalObject(std::cref(member),
- std::cref(group.getInterface()),
- std::cref(group.getProperty())),
- actions};
+ const auto match =
+ rules::interfacesRemoved() + rules::argNpath(0, member);
+ SignalPkg signalPkg = {
+ Handlers::interfacesRemoved,
+ SignalObject(std::cref(member), std::cref(group.getInterface()),
+ std::cref(group.getProperty())),
+ actions};
auto isSameSig = [&intf = group.getInterface()](SignalPkg& pkg) {
auto& obj = std::get<SignalObject>(pkg);
return intf == std::get<Intf>(obj);
@@ -252,8 +252,8 @@
auto availSignals =
std::accumulate(std::next(signals.begin()), signals.end(),
signals.begin()->first, [](auto list, auto signal) {
- return std::move(list) + ", " + signal.first;
- });
+ return std::move(list) + ", " + signal.first;
+ });
auto msg =
std::format("Event '{}' requires a supported signal given to be "
"triggered by signal, available signals: {}",
@@ -269,8 +269,8 @@
TriggerActions signalActions;
std::for_each(actions.begin(), actions.end(),
[&signalActions](auto& action) {
- signalActions.emplace_back(std::ref(action));
- });
+ signalActions.emplace_back(std::ref(action));
+ });
for (const auto& group : groups)
{
// Call signal subscriber for each group