chore: Enable modernize-avoid-bind (#7711)

This commit is contained in:
Ayaz Salikhov
2026-07-03 12:17:03 +01:00
committed by GitHub
parent 7ba1d76d05
commit f151293e8a
40 changed files with 356 additions and 445 deletions

View File

@@ -30,6 +30,7 @@
#include <chrono>
#include <condition_variable>
#include <cstddef>
#include <exception>
#include <functional>
#include <iostream>
@@ -172,9 +173,9 @@ public:
}));
ws_.handshake(ep.address().to_string() + ":" + std::to_string(ep.port()), "/");
ws_.async_read(
rb_,
boost::asio::bind_executor(
strand_, std::bind(&WSClientImpl::onReadMsg, this, std::placeholders::_1)));
rb_, boost::asio::bind_executor(strand_, [this](error_code const& ec, std::size_t) {
onReadMsg(ec);
}));
}
catch (std::exception&)
{
@@ -310,9 +311,9 @@ private:
cv_.notify_all();
}
ws_.async_read(
rb_,
boost::asio::bind_executor(
strand_, std::bind(&WSClientImpl::onReadMsg, this, std::placeholders::_1)));
rb_, boost::asio::bind_executor(strand_, [this](error_code const& ec, std::size_t) {
onReadMsg(ec);
}));
}
// Called when the read op terminates