]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librados: Make ObjectOperation move constructible
authorAdam C. Emerson <aemerson@redhat.com>
Sat, 16 Feb 2019 17:55:34 +0000 (12:55 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 8 Apr 2019 16:43:48 +0000 (12:43 -0400)
commitb2fea9ada4e89ae2a7943d7071095baa487d92bf
treedb5e172dacec9fad1f929cda5dbaf4dcd728a606
parent7b03130e2a2db4a67f19759f78d20d3dd682f4eb
librados: Make ObjectOperation move constructible

Since it just holds a pointer to a heap-allocated ObjectOperationImpl,
there's no reason not to. This allows us to move them around so the
call to aio_operate can happen after the stack frame where the
ObjectOperation was created has exited.

Would have just switched to a unique_ptr but the test harness relies
on being able to slip its own stuff in there and it was less work to
write my own move constructors than edit all the casts there to use
the get method.

Since there is no move construction now, no code will be broken if we
assert on use of moved-from objects and feedback suggests that people
think this is likelier to catch erroneous use than lazy
reinitialization.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/include/rados/librados.hpp
src/librados/librados_cxx.cc