mirror of https://github.com/aria2/aria2
DownloadEngine: Use std::unique_ptr for dnsCache_
parent
9130dc6776
commit
3a3ac4ef9b
|
@ -100,7 +100,7 @@ DownloadEngine::DownloadEngine(const std::shared_ptr<EventPoll>& eventPoll)
|
||||||
#ifdef HAVE_ARES_ADDR_NODE
|
#ifdef HAVE_ARES_ADDR_NODE
|
||||||
asyncDNSServers_(0),
|
asyncDNSServers_(0),
|
||||||
#endif // HAVE_ARES_ADDR_NODE
|
#endif // HAVE_ARES_ADDR_NODE
|
||||||
dnsCache_(new DNSCache()),
|
dnsCache_(make_unique<DNSCache>()),
|
||||||
option_(0)
|
option_(0)
|
||||||
{
|
{
|
||||||
unsigned char sessionId[20];
|
unsigned char sessionId[20];
|
||||||
|
|
|
@ -145,7 +145,7 @@ private:
|
||||||
ares_addr_node* asyncDNSServers_;
|
ares_addr_node* asyncDNSServers_;
|
||||||
#endif // HAVE_ARES_ADDR_NODE
|
#endif // HAVE_ARES_ADDR_NODE
|
||||||
|
|
||||||
std::shared_ptr<DNSCache> dnsCache_;
|
std::unique_ptr<DNSCache> dnsCache_;
|
||||||
|
|
||||||
std::unique_ptr<AuthConfigFactory> authConfigFactory_;
|
std::unique_ptr<AuthConfigFactory> authConfigFactory_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue