From 9ee47e59995f858ec531b3ee467f131594e4ba1f Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 13 Apr 2020 18:38:06 +0200 Subject: Using Super. --- src/OSSupport/ServerHandleImpl.h | 3 ++- src/OSSupport/TCPLinkImpl.cpp | 4 ++-- src/OSSupport/TCPLinkImpl.h | 3 ++- src/OSSupport/UDPEndpointImpl.cpp | 2 +- src/OSSupport/UDPEndpointImpl.h | 3 ++- 5 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src/OSSupport') diff --git a/src/OSSupport/ServerHandleImpl.h b/src/OSSupport/ServerHandleImpl.h index 1edd59dc1..eb0dca386 100644 --- a/src/OSSupport/ServerHandleImpl.h +++ b/src/OSSupport/ServerHandleImpl.h @@ -34,10 +34,11 @@ typedef std::vector cServerHandleImplPtrs; class cServerHandleImpl: public cServerHandle { - typedef cServerHandle super; + using Super = cServerHandle; friend class cTCPLinkImpl; public: + /** Closes the server, dropping all the connections. */ virtual ~cServerHandleImpl() override; diff --git a/src/OSSupport/TCPLinkImpl.cpp b/src/OSSupport/TCPLinkImpl.cpp index 63e5fb1da..f1918a76b 100644 --- a/src/OSSupport/TCPLinkImpl.cpp +++ b/src/OSSupport/TCPLinkImpl.cpp @@ -18,7 +18,7 @@ // cTCPLinkImpl: cTCPLinkImpl::cTCPLinkImpl(cTCPLink::cCallbacksPtr a_LinkCallbacks): - super(a_LinkCallbacks), + Super(a_LinkCallbacks), m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), -1, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE | BEV_OPT_DEFER_CALLBACKS | BEV_OPT_UNLOCK_CALLBACKS)), m_LocalPort(0), m_RemotePort(0), @@ -31,7 +31,7 @@ cTCPLinkImpl::cTCPLinkImpl(cTCPLink::cCallbacksPtr a_LinkCallbacks): cTCPLinkImpl::cTCPLinkImpl(evutil_socket_t a_Socket, cTCPLink::cCallbacksPtr a_LinkCallbacks, cServerHandleImplPtr a_Server, const sockaddr * a_Address, socklen_t a_AddrLen): - super(a_LinkCallbacks), + Super(a_LinkCallbacks), m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), a_Socket, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE | BEV_OPT_DEFER_CALLBACKS | BEV_OPT_UNLOCK_CALLBACKS)), m_Server(a_Server), m_LocalPort(0), diff --git a/src/OSSupport/TCPLinkImpl.h b/src/OSSupport/TCPLinkImpl.h index 0bd19b127..4b8c6f308 100644 --- a/src/OSSupport/TCPLinkImpl.h +++ b/src/OSSupport/TCPLinkImpl.h @@ -34,9 +34,10 @@ typedef std::vector cTCPLinkImplPtrs; class cTCPLinkImpl: public cTCPLink { - typedef cTCPLink super; + using Super = cTCPLink; public: + /** Creates a new link based on the given socket. Used for connections accepted in a server using cNetwork::Listen(). a_Address and a_AddrLen describe the remote peer that has connected. diff --git a/src/OSSupport/UDPEndpointImpl.cpp b/src/OSSupport/UDPEndpointImpl.cpp index 68117e5a0..3235ff91f 100644 --- a/src/OSSupport/UDPEndpointImpl.cpp +++ b/src/OSSupport/UDPEndpointImpl.cpp @@ -182,7 +182,7 @@ protected: // cUDPEndpointImpl: cUDPEndpointImpl::cUDPEndpointImpl(UInt16 a_Port, cUDPEndpoint::cCallbacks & a_Callbacks): - super(a_Callbacks), + Super(a_Callbacks), m_Port(0), m_MainSock(-1), m_IsMainSockIPv6(true), diff --git a/src/OSSupport/UDPEndpointImpl.h b/src/OSSupport/UDPEndpointImpl.h index a6ca37c27..32263d388 100644 --- a/src/OSSupport/UDPEndpointImpl.h +++ b/src/OSSupport/UDPEndpointImpl.h @@ -27,9 +27,10 @@ typedef std::shared_ptr cUDPEndpointImplPtr; class cUDPEndpointImpl: public cUDPEndpoint { - typedef cUDPEndpoint super; + using Super = cUDPEndpoint; public: + /** Creates a new instance of the endpoint, with the specified callbacks. Tries to open on the specified port; if it fails, the endpoint is left in the "closed" state. If a_Port is 0, the OS is free to assign any port number it likes to the endpoint. */ -- cgit v1.2.3