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: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/http/routing.hpp b/http/routing.hpp
index 5205a5b..6f42d22 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -213,8 +213,8 @@
if (reqUrl.starts_with(fragment))
{
- FindResult ret = findHelper(reqUrl.substr(fragment.size()),
- child, params);
+ FindResult ret =
+ findHelper(reqUrl.substr(fragment.size()), child, params);
if (ret.ruleIndex != 0U)
{
return {ret.ruleIndex, std::move(ret.params)};
@@ -532,8 +532,8 @@
perMethodIndex++)
{
// Make sure it's safe to deference the array at that index
- static_assert(maxVerbIndex <
- std::tuple_size_v<decltype(perMethods)>);
+ static_assert(
+ maxVerbIndex < std::tuple_size_v<decltype(perMethods)>);
FindRoute route = findRouteByPerMethod(req.url().encoded_path(),
perMethods[perMethodIndex]);
if (route.rule == nullptr)
@@ -584,11 +584,12 @@
// TODO(ed) This should be able to use std::bind_front, but it doesn't
// appear to work with the std::move on adaptor.
- validatePrivilege(req, asyncResp, rule,
- [req, &rule, asyncResp,
- adaptor = std::forward<Adaptor>(adaptor)]() mutable {
- rule.handleUpgrade(*req, asyncResp, std::move(adaptor));
- });
+ validatePrivilege(
+ req, asyncResp, rule,
+ [req, &rule, asyncResp,
+ adaptor = std::forward<Adaptor>(adaptor)]() mutable {
+ rule.handleUpgrade(*req, asyncResp, std::move(adaptor));
+ });
}
void handle(const std::shared_ptr<Request>& req,
@@ -657,8 +658,8 @@
validatePrivilege(
req, asyncResp, rule,
[req, asyncResp, &rule, params = std::move(params)]() {
- rule.handle(*req, asyncResp, params);
- });
+ rule.handle(*req, asyncResp, params);
+ });
}
void debugPrint()