summaryrefslogtreecommitdiff
path: root/protocols/CurrencyRates
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-07-24 14:30:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-07-24 14:30:13 +0300
commit103de9c164934b2393dfcba7011625f90c8a2097 (patch)
treef7a4a09afe29398f3b7605d7d0db264638a18150 /protocols/CurrencyRates
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/CurrencyRates')
-rw-r--r--protocols/CurrencyRates/src/HTTPSession.cpp6
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;
}