]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kv: apply the move semantics in KeyValueDB::get(). 24495/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Sat, 6 Oct 2018 13:47:35 +0000 (15:47 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 9 Oct 2018 14:50:48 +0000 (16:50 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/kv/KeyValueDB.h

index f9d9665aed63e1f26c3a76645df83853f6ebc030..09379447690e8c81374e68dd3e91f01525a47e6c 100644 (file)
@@ -186,7 +186,7 @@ public:
     std::map<std::string,bufferlist> om;
     int r = get(prefix, ks, &om);
     if (om.find(key) != om.end()) {
-      *value = om[key];
+      *value = std::move(om[key]);
     } else {
       *value = bufferlist();
       r = -ENOENT;