diff options
author | louiz’ <louiz@louiz.org> | 2017-04-07 18:45:24 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-04-07 18:45:24 +0200 |
commit | 5402a256d1f0ebbeafa32d250d000cf38fe748fb (patch) | |
tree | 7132c08b9465823c0fd5066eca1fac61ffa7185c /src/network | |
parent | dd4c54c6cde55c034d756fb736259ce51e0120dc (diff) | |
download | biboumi-5402a256d1f0ebbeafa32d250d000cf38fe748fb.tar.gz biboumi-5402a256d1f0ebbeafa32d250d000cf38fe748fb.tar.bz2 biboumi-5402a256d1f0ebbeafa32d250d000cf38fe748fb.tar.xz biboumi-5402a256d1f0ebbeafa32d250d000cf38fe748fb.zip |
Apply all the clang-tidy modernize-* fixes
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/poller.cpp | 4 | ||||
-rw-r--r-- | src/network/tcp_client_socket_handler.cpp | 2 | ||||
-rw-r--r-- | src/network/tcp_server_socket.hpp | 1 | ||||
-rw-r--r-- | src/network/tcp_socket_handler.cpp | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/src/network/poller.cpp b/src/network/poller.cpp index 9f5bcfb..9f62e36 100644 --- a/src/network/poller.cpp +++ b/src/network/poller.cpp @@ -2,8 +2,8 @@ #include <logger/logger.hpp> #include <utils/timed_events.hpp> -#include <assert.h> -#include <errno.h> +#include <cassert> +#include <cerrno> #include <stdio.h> #include <signal.h> #include <unistd.h> diff --git a/src/network/tcp_client_socket_handler.cpp b/src/network/tcp_client_socket_handler.cpp index 4628703..7181c9d 100644 --- a/src/network/tcp_client_socket_handler.cpp +++ b/src/network/tcp_client_socket_handler.cpp @@ -256,6 +256,6 @@ std::string TCPClientSocketHandler::get_port() const bool TCPClientSocketHandler::match_port_pairt(const uint16_t local, const uint16_t remote) const { - const uint16_t remote_port = static_cast<uint16_t>(std::stoi(this->port)); + const auto remote_port = static_cast<uint16_t>(std::stoi(this->port)); return this->is_connected() && local == this->local_port && remote == remote_port; } diff --git a/src/network/tcp_server_socket.hpp b/src/network/tcp_server_socket.hpp index c511962..652b773 100644 --- a/src/network/tcp_server_socket.hpp +++ b/src/network/tcp_server_socket.hpp @@ -12,7 +12,6 @@ #include <netinet/ip.h> #include <cstring> -#include <cassert> template <typename RemoteSocketType> class TcpSocketServer: public SocketHandler diff --git a/src/network/tcp_socket_handler.cpp b/src/network/tcp_socket_handler.cpp index 7eebae0..b5e5db1 100644 --- a/src/network/tcp_socket_handler.cpp +++ b/src/network/tcp_socket_handler.cpp @@ -8,7 +8,7 @@ #include <sys/types.h> #include <stdexcept> #include <unistd.h> -#include <errno.h> +#include <cerrno> #include <cstring> #ifdef BOTAN_FOUND |