]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix perfect forwarding of template arguments in IO filters.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 7 Oct 2016 08:10:11 +0000 (10:10 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 21 Oct 2016 20:57:22 +0000 (22:57 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_client_io.h
src/rgw/rgw_client_io_decoimpl.h

index de1b09cb5cd86d16c7985695e08ba34174913aa5..5db0a9f45bfb0936fbfc9dcac4a099af99974ca6 100644 (file)
@@ -124,7 +124,7 @@ protected:
 
 public:
   DecoratedRestfulClient(DecorateeT&& decoratee)
-    : decoratee(std::move(decoratee)) {
+    : decoratee(std::forward<DecorateeT>(decoratee)) {
   }
 
   size_t send_status(const int status,
index 3ffab616b07bf85a0f1b028476adf53e1e0ef3e2..f573af8eccaf4798fc9658b451ac848886402613 100644 (file)
@@ -24,7 +24,7 @@ class AccountingFilter : public DecoratedRestfulClient<T>,
 public:
   template <typename U>
   AccountingFilter(U&& decoratee)
-    : DecoratedRestfulClient<T>(std::move(decoratee)),
+    : DecoratedRestfulClient<T>(std::forward<U>(decoratee)),
       enabled(false),
       total_sent(0),
       total_received(0) {
@@ -126,7 +126,7 @@ protected:
 public:
   template <typename U>
   BufferingFilter(U&& decoratee)
-    : DecoratedRestfulClient<T>(std::move(decoratee)),
+    : DecoratedRestfulClient<T>(std::forward<U>(decoratee)),
       has_content_length(false),
       buffer_data(false) {
   }
@@ -202,7 +202,7 @@ size_t BufferingFilter<T>::complete_request()
 
 template <typename T> static inline
 BufferingFilter<T> add_buffering(T&& t) {
-  return BufferingFilter<T>(std::move(t));
+  return BufferingFilter<T>(std::forward<T>(t));
 }
 
 
@@ -216,7 +216,7 @@ protected:
 public:
   template <typename U>
   ChunkingFilter(U&& decoratee)
-    : DecoratedRestfulClient<T>(std::move(decoratee)),
+    : DecoratedRestfulClient<T>(std::forward<U>(decoratee)),
       has_content_length(false),
       chunking_enabled(false) {
   }
@@ -266,7 +266,7 @@ public:
 
 template <typename T> static inline
 ChunkingFilter<T> add_chunking(T&& t) {
-  return ChunkingFilter<T>(std::move(t));
+  return ChunkingFilter<T>(std::forward<T>(t));
 }
 
 
@@ -285,7 +285,7 @@ protected:
 public:
   template <typename U>
   ConLenControllingFilter(U&& decoratee)
-    : DecoratedRestfulClient<T>(std::move(decoratee)),
+    : DecoratedRestfulClient<T>(std::forward<U>(decoratee)),
       action(ContentLengthAction::UNKNOWN) {
   }
 
@@ -315,7 +315,7 @@ public:
 
 template <typename T> static inline
 ConLenControllingFilter<T> add_conlen_controlling(T&& t) {
-  return ConLenControllingFilter<T>(std::move(t));
+  return ConLenControllingFilter<T>(std::forward<T>(t));
 }
 
 
@@ -352,7 +352,7 @@ protected:
 public:
   template <typename U>
   ReorderingFilter(U&& decoratee)
-    : DecoratedRestfulClient<T>(std::move(decoratee)),
+    : DecoratedRestfulClient<T>(std::forward<U>(decoratee)),
       phase(ReorderState::RGW_EARLY_HEADERS) {
   }
 
@@ -396,7 +396,7 @@ public:
 
 template <typename T> static inline
 ReorderingFilter<T> add_reordering(T&& t) {
-  return ReorderingFilter<T>(std::move(t));
+  return ReorderingFilter<T>(std::forward<T>(t));
 }
 
 } /* namespace io */