소스 검색

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_;