From 134e9a07773fd52fc575c81b1a5ef3cd24eb35cd Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 8 Dec 2019 05:05:52 +0300 Subject: server: proper integer types So that VS 2019 doesn't complain. --- server/main/server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/main/server.cpp') diff --git a/server/main/server.cpp b/server/main/server.cpp index 3800144..faeebf1 100644 --- a/server/main/server.cpp +++ b/server/main/server.cpp @@ -19,11 +19,11 @@ namespace math::server { namespace { -boost::asio::ip::tcp::endpoint make_endpoint(unsigned port) { +boost::asio::ip::tcp::endpoint make_endpoint(unsigned short port) { return {boost::asio::ip::tcp::v4(), port}; } -void configure_acceptor(boost::asio::ip::tcp::acceptor& acceptor, unsigned port) { +void configure_acceptor(boost::asio::ip::tcp::acceptor& acceptor, unsigned short port) { try { const auto endpoint = make_endpoint(port); acceptor.open(endpoint.protocol()); @@ -41,7 +41,7 @@ Server::Server(const Settings& settings) : Server{settings.m_port, settings.m_threads} { } -Server::Server(unsigned port, unsigned threads) +Server::Server(unsigned short port, std::size_t threads) : m_numof_threads{threads} , m_signals{m_io_context} , m_acceptor{m_io_context} { -- cgit v1.2.3