From bca6d81b5e22f9cd7d42b7c9e4a2132e785fa602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Thu, 16 May 2024 14:22:30 +0200 Subject: [PATCH] clang-tidy --- .clang-tidy.in | 3 ++- exe/backend/src/http_server.cc | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.clang-tidy.in b/.clang-tidy.in index 82d7cf8..d99bbb0 100644 --- a/.clang-tidy.in +++ b/.clang-tidy.in @@ -79,7 +79,8 @@ Checks: "*,\ -bugprone-reserved-identifier,\ -cert-dcl51-cpp,\ -misc-confusable-identifiers,\ --misc-include-cleaner" +-misc-include-cleaner,\ +-bugprone-switch-missing-default-case" WarningsAsErrors: '*' HeaderFilterRegex: '^${RELATIVE_SOURCE_DIR}(base|modules|test)/' AnalyzeTemporaryDtors: false diff --git a/exe/backend/src/http_server.cc b/exe/backend/src/http_server.cc index 17e07da..5ba2ef0 100644 --- a/exe/backend/src/http_server.cc +++ b/exe/backend/src/http_server.cc @@ -276,13 +276,14 @@ struct http_server::impl { } template - void run_parallel(Fn&& handler, - web_server::http_req_t const& req, - web_server::http_res_cb_t const& cb) { + void run_parallel( + Fn&& handler, // NOLINT(cppcoreguidelines-missing-std-forward) + web_server::http_req_t const& req, + web_server::http_res_cb_t const& cb) { boost::asio::post( - thread_pool_, [req, cb, handler = std::forward(handler), this]() { + thread_pool_, [req, cb, h = std::forward(handler), this]() { try { - handler(req, [req, cb, this](web_server::http_res_t&& res) { + h(req, [req, cb, this](web_server::http_res_t&& res) { boost::asio::post(ioc_, [cb, req, res{std::move(res)}]() mutable { try { cb(std::move(res));