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/HTTP/UrlClient.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/HTTP/UrlClient.cpp') diff --git a/src/HTTP/UrlClient.cpp b/src/HTTP/UrlClient.cpp index 29d5e28d7..f7d12028d 100644 --- a/src/HTTP/UrlClient.cpp +++ b/src/HTTP/UrlClient.cpp @@ -16,7 +16,7 @@ // fwd: class cSchemeHandler; -typedef SharedPtr cSchemeHandlerPtr; +typedef std::shared_ptr cSchemeHandlerPtr; @@ -40,7 +40,7 @@ public: { // Create a new instance of cUrlClientRequest, wrapped in a SharedPtr, so that it has a controlled lifetime. // Cannot use std::make_shared, because the constructor is not public - SharedPtr ptr (new cUrlClientRequest( + std::shared_ptr ptr (new cUrlClientRequest( a_Method, a_URL, std::move(a_Callbacks), std::move(a_Headers), a_Body, std::move(a_Options) )); return ptr->DoRequest(ptr); @@ -128,10 +128,10 @@ protected: /** SharedPtr to self, so that this object can keep itself alive for as long as it needs, and pass self as callbacks to cNetwork functions. */ - SharedPtr m_Self; + std::shared_ptr m_Self; /** The handler that "talks" the protocol specified in m_UrlScheme, handles all the sending and receiving. */ - SharedPtr m_SchemeHandler; + std::shared_ptr m_SchemeHandler; /** The link handling the request. */ cTCPLinkPtr m_Link; @@ -161,7 +161,7 @@ protected: } - std::pair DoRequest(SharedPtr a_Self); + std::pair DoRequest(std::shared_ptr a_Self); // cNetwork::cConnectCallbacks override: TCP link connected: @@ -569,7 +569,7 @@ void cUrlClientRequest::OnRemoteClosed() -std::pair cUrlClientRequest::DoRequest(SharedPtr a_Self) +std::pair cUrlClientRequest::DoRequest(std::shared_ptr a_Self) { // We need a shared pointer to self, care must be taken not to pass any other ptr: ASSERT(a_Self.get() == this); -- cgit v1.2.3