More const

This commit is contained in:
alesapin 2020-11-23 23:22:04 +03:00
parent 2da250164e
commit 1de175257b
2 changed files with 4 additions and 4 deletions

View File

@ -208,7 +208,7 @@ Poco::Net::SocketAddress makeSocketAddress(const std::string & host, UInt16 port
return socket_address; return socket_address;
} }
Poco::Net::SocketAddress Server::socketBindListen(Poco::Net::ServerSocket & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure) Poco::Net::SocketAddress Server::socketBindListen(Poco::Net::ServerSocket & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure) const
{ {
auto address = makeSocketAddress(host, port, &logger()); auto address = makeSocketAddress(host, port, &logger());
#if !defined(POCO_CLICKHOUSE_PATCH) || POCO_VERSION < 0x01090100 #if !defined(POCO_CLICKHOUSE_PATCH) || POCO_VERSION < 0x01090100
@ -229,7 +229,7 @@ Poco::Net::SocketAddress Server::socketBindListen(Poco::Net::ServerSocket & sock
return address; return address;
} }
void Server::createServer(const std::string & listen_host, const char * port_name, bool listen_try, CreateServerFunc && func) void Server::createServer(const std::string & listen_host, const char * port_name, bool listen_try, CreateServerFunc && func) const
{ {
/// For testing purposes, user may omit tcp_port or http_port or https_port in configuration file. /// For testing purposes, user may omit tcp_port or http_port or https_port in configuration file.
if (!config().has(port_name)) if (!config().has(port_name))

View File

@ -67,10 +67,10 @@ private:
private: private:
Poco::Net::SocketAddress socketBindListen(Poco::Net::ServerSocket & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure = false); Poco::Net::SocketAddress socketBindListen(Poco::Net::ServerSocket & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure = false) const;
using CreateServerFunc = std::function<void(UInt16)>; using CreateServerFunc = std::function<void(UInt16)>;
void createServer(const std::string & listen_host, const char * port_name, bool listen_try, CreateServerFunc && func); void createServer(const std::string & listen_host, const char * port_name, bool listen_try, CreateServerFunc && func) const;
}; };
} }