]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: Remove pessimizing move
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 10 Apr 2017 19:55:23 +0000 (15:55 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 11 Apr 2017 01:57:14 +0000 (21:57 -0400)
Do not std::move returned values.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/librbd/librbd.cc

index cbc96bd6009973737b135bce0fffddf8dff87aa6..37e38f5844cdf4a3ce6e577ec8d9cc4515f439cc 100644 (file)
@@ -3267,10 +3267,10 @@ extern "C" int rbd_aio_readv(rbd_image_t image, const struct iovec *iov,
   if (r == 0) {
     librbd::io::ReadResult read_result;
     if (iovcnt == 1) {
-      read_result = std::move(librbd::io::ReadResult(
-        static_cast<char *>(iov[0].iov_base), iov[0].iov_len));
+      read_result = librbd::io::ReadResult(
+        static_cast<char *>(iov[0].iov_base), iov[0].iov_len);
     } else {
-      read_result = std::move(librbd::io::ReadResult(iov, iovcnt));
+      read_result = librbd::io::ReadResult(iov, iovcnt);
     }
     ictx->io_work_queue->aio_read(get_aio_completion(comp), off, len,
                                   std::move(read_result), 0);