From f83b0fcfa38cf80b15b275d48c131fa691d3006b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 6 Jul 2013 19:26:30 +0900 Subject: Refactor MultiUrlRequestInfo ctor StatCalc creation is moved to MultiUrlRequestInfo. The summary output is done only when PREF_QUIET is false and it is always to global::cout(), so remove summaryOut_ and just use global::cout() in that case. Also use std::unique_ptr for statCalc_ in DownloadEngine. --- src/DownloadEngine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/DownloadEngine.h') diff --git a/src/DownloadEngine.h b/src/DownloadEngine.h index 4f05204d..efc9fcc4 100644 --- a/src/DownloadEngine.h +++ b/src/DownloadEngine.h @@ -82,7 +82,7 @@ private: std::shared_ptr eventPoll_; - std::shared_ptr statCalc_; + std::unique_ptr statCalc_; int haltRequested_; @@ -235,7 +235,7 @@ public: option_ = op; } - void setStatCalc(const std::shared_ptr& statCalc); + void setStatCalc(std::unique_ptr statCalc); bool isHaltRequested() const { -- cgit