From a5d95afb96eb9a3b65d82f5f84bf8e4a4fb4c8ac Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Fri, 28 Aug 2026 21:12:55 +0200 Subject: clang-format C++ sources --- server/src/req_ctx.cppm | 71 +++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 37 deletions(-) (limited to 'server/src/req_ctx.cppm') diff --git a/server/src/req_ctx.cppm b/server/src/req_ctx.cppm index 797c51d..4a64d7d 100644 --- a/server/src/req_ctx.cppm +++ b/server/src/req_ctx.cppm @@ -10,42 +10,39 @@ import :trace; namespace routemon { - export class req_ctx { - trace::id tid_; - std::locale locale_; - http::verb_set route_verbs_; - bool keep_alive_; - bhttp::request_header const& req_header_; - - public: - explicit req_ctx(trace::id tid, std::locale locale, http::verb_set route_verbs, bool keep_alive, bhttp::request_header const& req_header) - : tid_{tid}, locale_{locale}, route_verbs_{route_verbs}, keep_alive_{keep_alive}, req_header_{req_header} - {} - - template - explicit req_ctx(trace::id tid, std::locale locale, http::verb_set route_verbs, bhttp::request const& req) - : req_ctx{tid, locale, route_verbs, req.keep_alive(), req.base()} - {} - - auto trace_id() const -> trace::id { - return tid_; - } - - auto locale() const -> std::locale { - return locale_; - } - - auto route_verbs() const -> http::verb_set { - return route_verbs_; - } - - auto keep_alive() const -> bool { - return keep_alive_; - } - - auto req_header() const -> bhttp::request_header const& { - return req_header_; - } - }; +export class req_ctx +{ + trace::id tid_; + std::locale locale_; + http::verb_set route_verbs_; + bool keep_alive_; + bhttp::request_header const& req_header_; + +public: + explicit req_ctx( + trace::id tid, std::locale locale, http::verb_set route_verbs, + bool keep_alive, bhttp::request_header const& req_header) + : tid_{tid}, locale_{locale}, route_verbs_{route_verbs}, + keep_alive_{keep_alive}, req_header_{req_header} + { + } + + template + explicit req_ctx( + trace::id tid, std::locale locale, http::verb_set route_verbs, + bhttp::request const& req) + : req_ctx{tid, locale, route_verbs, req.keep_alive(), req.base()} + { + } + + auto trace_id() const -> trace::id { return tid_; } + auto locale() const -> std::locale { return locale_; } + auto route_verbs() const -> http::verb_set { return route_verbs_; } + auto keep_alive() const -> bool { return keep_alive_; } + auto req_header() const -> bhttp::request_header const& + { + return req_header_; + } +}; } // namespace routemon -- cgit v1.3