diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-24 14:30:13 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-24 14:30:13 +0300 |
commit | 103de9c164934b2393dfcba7011625f90c8a2097 (patch) | |
tree | f7a4a09afe29398f3b7605d7d0db264638a18150 /protocols/CurrencyRates/src | |
parent | 541eab20530165d10592a9fda590f435c6a8b4be (diff) |
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/CurrencyRates/src')
-rw-r--r-- | protocols/CurrencyRates/src/HTTPSession.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/CurrencyRates/src/HTTPSession.cpp b/protocols/CurrencyRates/src/HTTPSession.cpp index 22c34867c5..004450736f 100644 --- a/protocols/CurrencyRates/src/HTTPSession.cpp +++ b/protocols/CurrencyRates/src/HTTPSession.cpp @@ -26,7 +26,7 @@ bool CHTTPSession::OpenURL(const tstring &rsURL) return true; } -bool CHTTPSession::ReadResponce(tstring& rsResponce) +bool CHTTPSession::ReadResponce(tstring &rsResponce) { if (m_szUrl.IsEmpty()) return false; @@ -48,7 +48,7 @@ bool CHTTPSession::ReadResponce(tstring& rsResponce) nlhr.headers = headers; bool bResult = false; - NETLIBHTTPREQUEST *pReply = nullptr; + NLHR_PTR pReply(0); { mir_cslock lck(m_mx); pReply = Netlib_HttpTransaction(g_hNetLib, &nlhr); @@ -65,8 +65,6 @@ bool CHTTPSession::ReadResponce(tstring& rsResponce) bResult = true; } - - Netlib_FreeHttpRequest(pReply); } return bResult; } |