From 9a38c102dc4ff4a0a7cc96ccef7cd1400f37eea5 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 3 Jul 2013 23:42:55 +0900 Subject: Use std::unique_ptr for HttpResponse instead of std::shared_ptr --- src/HttpResponseCommand.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/HttpResponseCommand.h') diff --git a/src/HttpResponseCommand.h b/src/HttpResponseCommand.h index 15b6bb87..85a9dfff 100644 --- a/src/HttpResponseCommand.h +++ b/src/HttpResponseCommand.h @@ -63,13 +63,13 @@ class HttpResponseCommand : public AbstractCommand { private: std::shared_ptr httpConnection_; - bool handleDefaultEncoding(const std::shared_ptr& httpResponse); - bool handleOtherEncoding(const std::shared_ptr& httpResponse); - bool skipResponseBody(const std::shared_ptr& httpResponse); + bool handleDefaultEncoding(std::unique_ptr httpResponse); + bool handleOtherEncoding(std::unique_ptr httpResponse); + bool skipResponseBody(std::unique_ptr httpResponse); std::unique_ptr createHttpDownloadCommand - (const std::shared_ptr& httpResponse, + (std::unique_ptr httpResponse, const std::shared_ptr& streamFilter); void updateLastModifiedTime(const Time& lastModified); @@ -88,8 +88,7 @@ private: protected: bool executeInternal(); - bool shouldInflateContentEncoding - (const std::shared_ptr& httpResponse); + bool shouldInflateContentEncoding(HttpResponse* httpResponse); public: HttpResponseCommand(cuid_t cuid, -- cgit