浏览代码

DownloadEngine: Use std::unique_ptr for dnsCache_

Tatsuhiro Tsujikawa 12 年之前
父节点
当前提交
3a3ac4ef9b
共有 2 个文件被更改,包括 2 次插入2 次删除
  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_;