From: Radoslaw Zarzynski Date: Fri, 7 Oct 2016 08:10:11 +0000 (+0200) Subject: rgw: fix perfect forwarding of template arguments in IO filters. X-Git-Tag: v11.1.0~454^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b03f8773bfbf9f31fac58fcc3b6beab08445b4d;p=ceph.git rgw: fix perfect forwarding of template arguments in IO filters. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_client_io.h b/src/rgw/rgw_client_io.h index de1b09cb5cd..5db0a9f45bf 100644 --- a/src/rgw/rgw_client_io.h +++ b/src/rgw/rgw_client_io.h @@ -124,7 +124,7 @@ protected: public: DecoratedRestfulClient(DecorateeT&& decoratee) - : decoratee(std::move(decoratee)) { + : decoratee(std::forward(decoratee)) { } size_t send_status(const int status, diff --git a/src/rgw/rgw_client_io_decoimpl.h b/src/rgw/rgw_client_io_decoimpl.h index 3ffab616b07..f573af8ecca 100644 --- a/src/rgw/rgw_client_io_decoimpl.h +++ b/src/rgw/rgw_client_io_decoimpl.h @@ -24,7 +24,7 @@ class AccountingFilter : public DecoratedRestfulClient, public: template AccountingFilter(U&& decoratee) - : DecoratedRestfulClient(std::move(decoratee)), + : DecoratedRestfulClient(std::forward(decoratee)), enabled(false), total_sent(0), total_received(0) { @@ -126,7 +126,7 @@ protected: public: template BufferingFilter(U&& decoratee) - : DecoratedRestfulClient(std::move(decoratee)), + : DecoratedRestfulClient(std::forward(decoratee)), has_content_length(false), buffer_data(false) { } @@ -202,7 +202,7 @@ size_t BufferingFilter::complete_request() template static inline BufferingFilter add_buffering(T&& t) { - return BufferingFilter(std::move(t)); + return BufferingFilter(std::forward(t)); } @@ -216,7 +216,7 @@ protected: public: template ChunkingFilter(U&& decoratee) - : DecoratedRestfulClient(std::move(decoratee)), + : DecoratedRestfulClient(std::forward(decoratee)), has_content_length(false), chunking_enabled(false) { } @@ -266,7 +266,7 @@ public: template static inline ChunkingFilter add_chunking(T&& t) { - return ChunkingFilter(std::move(t)); + return ChunkingFilter(std::forward(t)); } @@ -285,7 +285,7 @@ protected: public: template ConLenControllingFilter(U&& decoratee) - : DecoratedRestfulClient(std::move(decoratee)), + : DecoratedRestfulClient(std::forward(decoratee)), action(ContentLengthAction::UNKNOWN) { } @@ -315,7 +315,7 @@ public: template static inline ConLenControllingFilter add_conlen_controlling(T&& t) { - return ConLenControllingFilter(std::move(t)); + return ConLenControllingFilter(std::forward(t)); } @@ -352,7 +352,7 @@ protected: public: template ReorderingFilter(U&& decoratee) - : DecoratedRestfulClient(std::move(decoratee)), + : DecoratedRestfulClient(std::forward(decoratee)), phase(ReorderState::RGW_EARLY_HEADERS) { } @@ -396,7 +396,7 @@ public: template static inline ReorderingFilter add_reordering(T&& t) { - return ReorderingFilter(std::move(t)); + return ReorderingFilter(std::forward(t)); } } /* namespace io */