Browse Source

Revert and disable readability-convert-member-functions-to-static

This breaks on GCC 6.3
pull/2247/head
Anders Jenbo 5 years ago
parent
commit
db3d1d4054
  1. 4
      Source/.clang-tidy
  2. 4
      Source/dvlnet/tcp_client.cpp
  3. 12
      Source/dvlnet/tcp_server.cpp

4
Source/.clang-tidy

@ -32,6 +32,7 @@
# A purely stylistic change that we do not want.
#
# -modernize-concat-nested-namespaces
# -modernize-avoid-bind
# Compatibility with older compilers.
Checks: >
-*,
@ -47,7 +48,8 @@ Checks: >
readability-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
-modernize-concat-nested-namespaces
-modernize-concat-nested-namespaces,
-modernize-avoid-bind
HeaderFilterRegex: "^(Source|test)\\.h$"

4
Source/dvlnet/tcp_client.cpp

@ -102,9 +102,7 @@ void tcp_client::start_recv()
{
sock.async_receive(
asio::buffer(recv_buffer),
[this](auto &&PH1, auto &&PH2) {
handle_recv(std::forward<decltype(PH1)>(PH1), std::forward<decltype(PH2)>(PH2));
});
std::bind(&tcp_client::handle_recv, this, std::placeholders::_1, std::placeholders::_2));
}
void tcp_client::handle_send(const asio::error_code &error, size_t bytesSent)

12
Source/dvlnet/tcp_server.cpp

@ -62,9 +62,7 @@ void tcp_server::start_recv(const scc &con)
{
con->socket.async_receive(
asio::buffer(con->recv_buffer),
[this, con](auto &&PH1, auto &&PH2) {
handle_recv(con, std::forward<decltype(PH1)>(PH1), std::forward<decltype(PH2)>(PH2));
});
std::bind(&tcp_server::handle_recv, this, con, std::placeholders::_1, std::placeholders::_2));
}
void tcp_server::handle_recv(const scc &con, const asio::error_code &ec,
@ -160,9 +158,7 @@ void tcp_server::start_accept()
auto nextcon = make_connection();
acceptor->async_accept(
nextcon->socket,
[this, nextcon](auto &&PH1) {
handle_accept(nextcon, std::forward<decltype(PH1)>(PH1));
});
std::bind(&tcp_server::handle_accept, this, nextcon, std::placeholders::_1));
}
void tcp_server::handle_accept(const scc &con, const asio::error_code &ec)
@ -185,9 +181,7 @@ void tcp_server::start_timeout(const scc &con)
{
con->timer.expires_after(std::chrono::seconds(1));
con->timer.async_wait(
[this, con](auto &&PH1) {
handle_timeout(con, std::forward<decltype(PH1)>(PH1));
});
std::bind(&tcp_server::handle_timeout, this, con, std::placeholders::_1));
}
void tcp_server::handle_timeout(const scc &con, const asio::error_code &ec)

Loading…
Cancel
Save