refactor: run clang linter and formatter

This commit is contained in:
CJ van den Berg 2025-01-20 18:21:54 +01:00
parent 7668befc06
commit 2dd2b9e087
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
27 changed files with 189 additions and 157 deletions

View file

@ -33,7 +33,7 @@ auto sub_plain(const hub &h, const handle &controller, string name) -> result {
ret = controller.send("ready", name);
if (not ret)
return ret;
receive([=](auto /*from*/, auto m) {
receive([=](const auto & /*from*/, const auto &m) {
string_view cmd;
check(m("parmA", "parmB", "parmC", extract(cmd)));
check(cmd == "continue" || cmd == "done");
@ -50,13 +50,13 @@ auto sub_plain(const hub &h, const handle &controller, string name) -> result {
auto sub_filtered(const hub &h, const handle &controller, string name)
-> result {
auto ret = h.subscribe(
[](auto m) { return m(type::any, type::any, type::any, "done"); });
[](const auto &m) { return m(type::any, type::any, type::any, "done"); });
if (not ret)
return ret;
ret = controller.send("ready", name);
if (not ret)
return ret;
receive([=](auto /*from*/, auto m) {
receive([=](const auto & /*from*/, const auto &m) {
check(m("parmA", "parmB", "parmC", "done"));
auto ret = controller.send("done", name);
if (not ret)
@ -66,7 +66,7 @@ auto sub_filtered(const hub &h, const handle &controller, string name)
return ok();
}
map<string, auto(*)(const hub &, const handle &, string)->result>
map<string, auto (*)(const hub &, const handle &, string)->result>
subscription_defs // NOLINT
= {
{"sub_plain", sub_plain},
@ -95,7 +95,7 @@ auto controller() -> result {
submap not_ready = subs;
submap done = subs;
receive([=](auto, auto m) mutable {
receive([=](const auto &, const auto &m) mutable {
string name;
if (m("ready", extract(name))) {
not_ready.erase(name);