From 664a8c3e85cef684610e0fa65fb2ea587e46232f Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 8 May 2021 10:53:21 +0200 Subject: Codechange: move connection_string to private for TCPConnecter The most common case never needs access to it anymore. Make the one exception to this explicit. This means the fact that we store it is now an implementation detail. --- src/network/core/tcp.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/network/core') diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index 624555649..1eddec6a4 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -74,6 +74,7 @@ private: std::chrono::steady_clock::time_point last_attempt; ///< Time we last tried to connect. std::atomic is_resolved = false; ///< Whether resolving is done. + std::string connection_string; ///< Current address we are connecting to (before resolving). void Resolve(); void OnResolved(addrinfo *ai); @@ -84,8 +85,6 @@ private: static void ResolveThunk(TCPConnecter *connecter); public: - std::string connection_string; ///< Current address we are connecting to (before resolving). - TCPConnecter(const std::string &connection_string, uint16 default_port); virtual ~TCPConnecter(); -- cgit v1.2.3-70-g09d2