From: Matt Benjamin Date: Tue, 12 Apr 2016 19:43:54 +0000 (-0400) Subject: rgw_file: force move semantics on rvalue refs in emplace_attrs X-Git-Tag: v10.2.0~8^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d8b65613602dc18114620c499691ca09ae66a1f;p=ceph.git rgw_file: force move semantics on rvalue refs in emplace_attrs Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index b96147994235..c8b1cd9c8c9a 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -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) {