From a56cfd1f42663856e346a26cbad401aec07bed91 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Thu, 20 Jul 2017 12:19:18 +0100 Subject: Remove smart pointer macros --- src/OSSupport/HostnameLookup.h | 2 +- src/OSSupport/IPLookup.h | 2 +- src/OSSupport/Network.h | 18 +++++++++--------- src/OSSupport/NetworkSingleton.h | 4 ++-- src/OSSupport/ServerHandleImpl.h | 4 ++-- src/OSSupport/TCPLinkImpl.h | 8 ++++---- src/OSSupport/UDPEndpointImpl.h | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/OSSupport') diff --git a/src/OSSupport/HostnameLookup.h b/src/OSSupport/HostnameLookup.h index 559dfad5f..9189ef021 100644 --- a/src/OSSupport/HostnameLookup.h +++ b/src/OSSupport/HostnameLookup.h @@ -37,7 +37,7 @@ protected: void Callback(int a_ErrCode, struct addrinfo * a_Addr); }; -typedef SharedPtr cHostnameLookupPtr; +typedef std::shared_ptr cHostnameLookupPtr; typedef std::vector cHostnameLookupPtrs; diff --git a/src/OSSupport/IPLookup.h b/src/OSSupport/IPLookup.h index 600ce0af2..4e3065f1c 100644 --- a/src/OSSupport/IPLookup.h +++ b/src/OSSupport/IPLookup.h @@ -39,7 +39,7 @@ protected: /** Callback that is called by LibEvent when there's an event for the request. */ void Callback(int a_Result, const char * a_Address); }; -typedef SharedPtr cIPLookupPtr; +typedef std::shared_ptr cIPLookupPtr; typedef std::vector cIPLookupPtrs; diff --git a/src/OSSupport/Network.h b/src/OSSupport/Network.h index 78c5e92f0..babf0c078 100644 --- a/src/OSSupport/Network.h +++ b/src/OSSupport/Network.h @@ -15,15 +15,15 @@ // fwd: class cTCPLink; -typedef SharedPtr cTCPLinkPtr; +typedef std::shared_ptr cTCPLinkPtr; typedef std::vector cTCPLinkPtrs; class cServerHandle; -typedef SharedPtr cServerHandlePtr; +typedef std::shared_ptr cServerHandlePtr; typedef std::vector cServerHandlePtrs; class cCryptoKey; -typedef SharedPtr cCryptoKeyPtr; +typedef std::shared_ptr cCryptoKeyPtr; class cX509Cert; -typedef SharedPtr cX509CertPtr; +typedef std::shared_ptr cX509CertPtr; @@ -61,7 +61,7 @@ public: /** Called when an error is detected on the connection. */ virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg) = 0; }; - typedef SharedPtr cCallbacksPtr; + typedef std::shared_ptr cCallbacksPtr; // Force a virtual destructor for all descendants: @@ -215,7 +215,7 @@ protected: } }; -typedef SharedPtr cUDPEndpointPtr; +typedef std::shared_ptr cUDPEndpointPtr; @@ -238,7 +238,7 @@ public: /** Called when the Connect call fails. */ virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg) = 0; }; - typedef SharedPtr cConnectCallbacksPtr; + typedef std::shared_ptr cConnectCallbacksPtr; /** Callbacks used when listening for incoming connections as a server. */ @@ -262,7 +262,7 @@ public: /** Called when the socket fails to listen on the specified port. */ virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg) = 0; }; - typedef SharedPtr cListenCallbacksPtr; + typedef std::shared_ptr cListenCallbacksPtr; /** Callbacks used when resolving names to IPs. */ @@ -298,7 +298,7 @@ public: Only called if there was no error reported. */ virtual void OnFinished(void) = 0; }; - typedef SharedPtr cResolveNameCallbacksPtr; + typedef std::shared_ptr cResolveNameCallbacksPtr; /** Queues a TCP connection to be made to the specified host. diff --git a/src/OSSupport/NetworkSingleton.h b/src/OSSupport/NetworkSingleton.h index 59ec713c4..7da3f7569 100644 --- a/src/OSSupport/NetworkSingleton.h +++ b/src/OSSupport/NetworkSingleton.h @@ -27,10 +27,10 @@ // fwd: struct event_base; class cTCPLinkImpl; -typedef SharedPtr cTCPLinkImplPtr; +typedef std::shared_ptr cTCPLinkImplPtr; typedef std::vector cTCPLinkImplPtrs; class cServerHandleImpl; -typedef SharedPtr cServerHandleImplPtr; +typedef std::shared_ptr cServerHandleImplPtr; typedef std::vector cServerHandleImplPtrs; diff --git a/src/OSSupport/ServerHandleImpl.h b/src/OSSupport/ServerHandleImpl.h index 8a22df18b..1edd59dc1 100644 --- a/src/OSSupport/ServerHandleImpl.h +++ b/src/OSSupport/ServerHandleImpl.h @@ -21,10 +21,10 @@ // fwd: class cTCPLinkImpl; -typedef SharedPtr cTCPLinkImplPtr; +typedef std::shared_ptr cTCPLinkImplPtr; typedef std::vector cTCPLinkImplPtrs; class cServerHandleImpl; -typedef SharedPtr cServerHandleImplPtr; +typedef std::shared_ptr cServerHandleImplPtr; typedef std::vector cServerHandleImplPtrs; diff --git a/src/OSSupport/TCPLinkImpl.h b/src/OSSupport/TCPLinkImpl.h index d582e2f8d..0437353fb 100644 --- a/src/OSSupport/TCPLinkImpl.h +++ b/src/OSSupport/TCPLinkImpl.h @@ -22,9 +22,9 @@ // fwd: class cServerHandleImpl; -typedef SharedPtr cServerHandleImplPtr; +typedef std::shared_ptr cServerHandleImplPtr; class cTCPLinkImpl; -typedef SharedPtr cTCPLinkImplPtr; +typedef std::shared_ptr cTCPLinkImplPtr; typedef std::vector cTCPLinkImplPtrs; @@ -79,8 +79,8 @@ protected: // fwd: class cLinkTlsContext; - typedef SharedPtr cLinkTlsContextPtr; - typedef WeakPtr cLinkTlsContextWPtr; + typedef std::shared_ptr cLinkTlsContextPtr; + typedef std::weak_ptr cLinkTlsContextWPtr; /** Wrapper around cSslContext that is used when this link is being encrypted by SSL. */ class cLinkTlsContext : diff --git a/src/OSSupport/UDPEndpointImpl.h b/src/OSSupport/UDPEndpointImpl.h index 56116df17..a6ca37c27 100644 --- a/src/OSSupport/UDPEndpointImpl.h +++ b/src/OSSupport/UDPEndpointImpl.h @@ -18,7 +18,7 @@ // fwd: class cUDPEndpointImpl; -typedef SharedPtr cUDPEndpointImplPtr; +typedef std::shared_ptr cUDPEndpointImplPtr; -- cgit v1.2.3