]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: force move semantics on rvalue refs in emplace_attrs
authorMatt Benjamin <mbenjamin@redhat.com>
Tue, 12 Apr 2016 19:43:54 +0000 (15:43 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Tue, 12 Apr 2016 20:13:18 +0000 (16:13 -0400)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_op.h

index b96147994235b08c8e4dbe7d6aa4109bbaef364c..c8b1cd9c8c9af3dc8d6e846efd9f8e8eb62571b4 100644 (file)
@@ -547,7 +547,7 @@ public:
   RGWCreateBucket() : has_cors(false) {}
 
   void emplace_attr(std::string&& key, buffer::list&& bl) {
-    attrs.emplace(key, bl); /* key and bl are r-value refs */
+    attrs.emplace(std::move(key), std::move(bl)); /* key and bl are r-value refs */
   }
 
   int verify_permission();
@@ -680,7 +680,7 @@ public:
   }
 
   void emplace_attr(std::string&& key, buffer::list&& bl) {
-    attrs.emplace(key, bl); /* key and bl are r-value refs */
+    attrs.emplace(std::move(key), std::move(bl)); /* key and bl are r-value refs */
   }
 
   virtual RGWPutObjProcessor *select_processor(RGWObjectCtx& obj_ctx, bool *is_multipart);
@@ -723,7 +723,7 @@ public:
                 data_pending(false) {}
 
   void emplace_attr(std::string&& key, buffer::list&& bl) {
-    attrs.emplace(key, bl); /* key and bl are r-value refs */
+    attrs.emplace(std::move(key), std::move(bl)); /* key and bl are r-value refs */
   }
 
   virtual void init(RGWRados *store, struct req_state *s, RGWHandler *h) {
@@ -789,7 +789,7 @@ public:
   {}
 
   void emplace_attr(std::string&& key, buffer::list&& bl) {
-    attrs.emplace(key, bl); /* key and bl are r-value refs */
+    attrs.emplace(std::move(key), std::move(bl)); /* key and bl are r-value refs */
   }
 
   virtual void init(RGWRados *store, struct req_state *s, RGWHandler *h) {
@@ -929,7 +929,7 @@ public:
                                   rgw_obj_key& object);
 
   void emplace_attr(std::string&& key, buffer::list&& bl) {
-    attrs.emplace(key, bl); /* key and bl are r-value refs */
+    attrs.emplace(std::move(key), std::move(bl));
   }
 
   virtual void init(RGWRados *store, struct req_state *s, RGWHandler *h) {