src: Remove empty parameter list from lambda

This commit is contained in:
Tatsuhiro Tsujikawa
2025-11-09 14:45:12 +09:00
parent ee2a4b625b
commit ca23a490c3
5 changed files with 9 additions and 9 deletions

View File

@@ -3241,7 +3241,7 @@ int main(int argc, char **argv) {
nclients, rate, max_samples_per_thread));
auto &worker = workers.back();
futures.push_back(
std::async(std::launch::async, [&worker, &mu, &cv, &ready]() {
std::async(std::launch::async, [&worker, &mu, &cv, &ready] {
{
std::unique_lock<std::mutex> ulk(mu);
cv.wait(ulk, [&ready] { return ready; });

View File

@@ -352,7 +352,7 @@ void ConnectionHandler::graceful_shutdown_worker() {
#ifndef NOTHREADS
ev_async_start(loop_, &thread_join_asyncev_);
thread_join_fut_ = std::async(std::launch::async, [this]() {
thread_join_fut_ = std::async(std::launch::async, [this] {
(void)reopen_log_files(get_config()->logging);
join_worker();
ev_async_send(get_loop(), &thread_join_asyncev_);

View File

@@ -400,7 +400,7 @@ select_quic_keying_material(const QUICKeyingMaterials &qkms, uint8_t km_id) {
std::span<uint64_t, 2> generate_siphash_key() {
// Use the same technique rust does.
thread_local static auto key = []() {
thread_local static auto key = [] {
std::array<uint64_t, 2> key;
auto s = as_writable_uint8_span(std::span{key});

View File

@@ -367,7 +367,7 @@ void Worker::replace_downstream_config(
for (auto &addr : shared_addr->addrs) {
addr.connect_blocker = std::make_unique<ConnectBlocker>(
randgen_, loop_, nullptr, [shared_addr_ptr, &addr]() {
randgen_, loop_, nullptr, [shared_addr_ptr, &addr] {
if (!addr.queued) {
if (!addr.wg) {
return;

View File

@@ -219,7 +219,7 @@ constexpr bool in_attr_char(char c) noexcept {
return in_attr_char_tbl[static_cast<uint8_t>(c)];
}
inline constexpr auto hex_to_uint_tbl = []() {
inline constexpr auto hex_to_uint_tbl = [] {
std::array<uint32_t, 256> tbl;
std::ranges::fill(tbl, 256);
@@ -601,7 +601,7 @@ time_t parse_http_date(const std::string_view &s);
// ASN1_TIME_print().
time_t parse_openssl_asn1_time_print(const std::string_view &s);
inline constexpr auto upcase_tbl = []() {
inline constexpr auto upcase_tbl = [] {
std::array<char, 256> tbl;
for (size_t i = 0; i < 256; ++i) {
@@ -723,7 +723,7 @@ constexpr O tolower(R &&r, O result) {
// Returns string representation of |n| with 2 fractional digits.
std::string dtos(double n);
inline constexpr auto count_digit_tbl = []() {
inline constexpr auto count_digit_tbl = [] {
std::array<uint64_t, std::numeric_limits<uint64_t>::digits10> tbl;
uint64_t x = 1;
@@ -751,7 +751,7 @@ template <std::unsigned_integral T> constexpr size_t count_digit(T x) {
return y + 1;
}
inline constexpr auto utos_digits = []() {
inline constexpr auto utos_digits = [] {
std::array<char, 200> a;
for (size_t i = 0; i < 100; ++i) {
@@ -1290,7 +1290,7 @@ template <std::input_or_output_iterator O, typename Generator>
void random_bytes(O first, O last, Generator &&gen) {
std::uniform_int_distribution<uint8_t> dis;
std::ranges::generate(std::move(first), std::move(last),
[&dis, &gen]() { return dis(gen); });
[&dis, &gen] { return dis(gen); });
}
// Fills the buffer pointed by |data| of length |destlen| with the