Ver código fonte

DownloadEngine: Use std::unique_ptr for dnsCache_

Tatsuhiro Tsujikawa 12 anos atrás
pai
commit
3a3ac4ef9b
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      src/DownloadEngine.cc
  2. 1 1
      src/DownloadEngine.h

+ 1 - 1
src/DownloadEngine.cc

@@ -100,7 +100,7 @@ DownloadEngine::DownloadEngine(const std::shared_ptr<EventPoll>& eventPoll)
 #ifdef HAVE_ARES_ADDR_NODE
     asyncDNSServers_(0),
 #endif // HAVE_ARES_ADDR_NODE
-    dnsCache_(new DNSCache()),
+    dnsCache_(make_unique<DNSCache>()),
     option_(0)
 {
   unsigned char sessionId[20];

+ 1 - 1
src/DownloadEngine.h

@@ -145,7 +145,7 @@ private:
   ares_addr_node* asyncDNSServers_;
 #endif // HAVE_ARES_ADDR_NODE
 
-  std::shared_ptr<DNSCache> dnsCache_;
+  std::unique_ptr<DNSCache> dnsCache_;
 
   std::unique_ptr<AuthConfigFactory> authConfigFactory_;