Reformat code with clang 10

This commit is contained in:
badaix 2020-11-27 21:29:34 +01:00
parent 59763f03c1
commit 3ac9245d00
24 changed files with 174 additions and 155 deletions

View file

@ -81,7 +81,7 @@ std::string StreamSessionTcp::getIP()
void StreamSessionTcp::read_next()
{
boost::asio::async_read(socket_, boost::asio::buffer(buffer_, base_msg_size_),
boost::asio::bind_executor(strand_, [ this, self = shared_from_this() ](boost::system::error_code ec, std::size_t length) mutable {
boost::asio::bind_executor(strand_, [this, self = shared_from_this()](boost::system::error_code ec, std::size_t length) mutable {
if (ec)
{
LOG(ERROR, LOG_TAG) << "Error reading message header of length " << length << ": " << ec.message() << "\n";
@ -131,6 +131,6 @@ void StreamSessionTcp::read_next()
void StreamSessionTcp::sendAsync(const shared_const_buffer& buffer, const WriteHandler& handler)
{
boost::asio::async_write(socket_, buffer,
boost::asio::bind_executor(strand_, [ self = shared_from_this(), buffer, handler ](boost::system::error_code ec,
std::size_t length) { handler(ec, length); }));
boost::asio::bind_executor(strand_, [self = shared_from_this(), buffer, handler](boost::system::error_code ec,
std::size_t length) { handler(ec, length); }));
}