Add clang tidy (#864)

Fixes #863
This commit is contained in:
Sergey Kuznetsov
2023-10-03 10:43:54 +01:00
committed by GitHub
parent 69f5025a29
commit 4b53bef1f5
198 changed files with 2168 additions and 1288 deletions

View File

@@ -19,6 +19,7 @@
#include <web/IntervalSweepHandler.h>
#include <util/Constants.h>
#include <web/DOSGuard.h>
#include <algorithm>
@@ -27,7 +28,10 @@
namespace web {
IntervalSweepHandler::IntervalSweepHandler(util::Config const& config, boost::asio::io_context& ctx)
: sweepInterval_{std::max(1u, static_cast<uint32_t>(config.valueOr("dos_guard.sweep_interval", 1.0) * 1000.0))}
: sweepInterval_{std::max(
1u,
static_cast<uint32_t>(
config.valueOr("dos_guard.sweep_interval", 1.0) * static_cast<double>(util::MILLISECONDS_PER_SECOND)))}
, ctx_{std::ref(ctx)}
, timer_{ctx.get_executor()}
{