diff options
author | Yehuda Sadeh <yehuda@redhat.com> | 2015-01-16 20:21:49 +0100 |
---|---|---|
committer | Yehuda Sadeh <yehuda@redhat.com> | 2015-01-20 00:58:02 +0100 |
commit | f51a5a94f6ed24a36e7c490e469b738d7d869478 (patch) | |
tree | eb7416d53d7493e0a52f4b8ae9222d7464b2c81a /src/cls/rgw/cls_rgw_client.cc | |
parent | rgw: fix unitest compilation (diff) | |
download | ceph-f51a5a94f6ed24a36e7c490e469b738d7d869478.tar.xz ceph-f51a5a94f6ed24a36e7c490e469b738d7d869478.zip |
cls_rgw: user swap() instead of assignment operator
More efficient this way. A fix following code review.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/cls/rgw/cls_rgw_client.cc')
-rw-r--r-- | src/cls/rgw/cls_rgw_client.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc index 40a54def6f4..2beb3cbf4f2 100644 --- a/src/cls/rgw/cls_rgw_client.cc +++ b/src/cls/rgw/cls_rgw_client.cc @@ -178,7 +178,7 @@ int cls_rgw_bi_list(librados::IoCtx& io_ctx, const string oid, return -EIO; } - *entries = op_ret.entries; + entries->swap(op_ret.entries); *is_truncated = op_ret.is_truncated; return 0; @@ -419,7 +419,7 @@ int cls_rgw_bi_log_list(IoCtx& io_ctx, string& oid, string& marker, uint32_t max return -EIO; } - entries = ret.entries; + entries.swap(ret.entries); if (truncated) *truncated = ret.truncated; @@ -549,7 +549,7 @@ int cls_rgw_gc_list(IoCtx& io_ctx, string& oid, string& marker, uint32_t max, bo return -EIO; } - entries = ret.entries; + entries.swap(ret.entries); if (truncated) *truncated = ret.truncated; |