Skip to content

Commit

Permalink
clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed May 16, 2024
1 parent 1e1aeac commit bca6d81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .clang-tidy.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions exe/backend/src/http_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,14 @@ struct http_server::impl {
}

template <typename Fn>
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<Fn>(handler), this]() {
thread_pool_, [req, cb, h = std::forward<Fn>(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));
Expand Down

0 comments on commit bca6d81

Please sign in to comment.