summaryrefslogtreecommitdiffstats
path: root/src/os/Transaction.h
diff options
context:
space:
mode:
authorRadoslaw Zarzynski <rzarzyns@redhat.com>2020-01-21 17:06:35 +0100
committerRadoslaw Zarzynski <rzarzyns@redhat.com>2020-01-26 16:22:24 +0100
commitd5e6db8c40607d1cf8aa0eed994ed46c82121d7f (patch)
tree23291f69a2a8f2946839010bdfeb4798b459c98f /src/os/Transaction.h
parenttest/bl: switch copy{_in} users to bufferlist::iterator. (diff)
downloadceph-d5e6db8c40607d1cf8aa0eed994ed46c82121d7f.tar.xz
ceph-d5e6db8c40607d1cf8aa0eed994ed46c82121d7f.zip
*: switch trivial users of bufferlist::copy{_in} to iterators.
This commits switches the most straightforward occurrences of: * ceph::bufferlist::copy(off, len, dst) and * ceph::bufferlist::copy_in(off, len, src) to use iterators. After extending `bufferlist::begin()` with the `offset` parameter and eradication of the `last_p` hint, these method look rudimentary. There is no huge benefit from bl.copy_in(off, len, dst) instead of: bl.begin(off).copy_in(len, dst) especially when `off` is `0`. Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to 'src/os/Transaction.h')
-rw-r--r--src/os/Transaction.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/Transaction.h b/src/os/Transaction.h
index 3b8eb1bb2f5..769f6b5e735 100644
--- a/src/os/Transaction.h
+++ b/src/os/Transaction.h
@@ -543,7 +543,7 @@ public:
ceph::buffer::list other_op_bl;
{
ceph::buffer::ptr other_op_bl_ptr(other.op_bl.length());
- other.op_bl.copy(0, other.op_bl.length(), other_op_bl_ptr.c_str());
+ other.op_bl.begin().copy(other.op_bl.length(), other_op_bl_ptr.c_str());
other_op_bl.append(std::move(other_op_bl_ptr));
}