]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: declare variables captured by do_with() using "auto"
authorKefu Chai <kchai@redhat.com>
Sun, 20 Dec 2020 16:50:50 +0000 (00:50 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 20 Dec 2020 16:50:52 +0000 (00:50 +0800)
auto& is just confusing, as `seastar::do_with()` pass the captureud
variables using `std::foward`. so these variable would be of the same
types as how they are passed to `do_with()`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/replicated_recovery_backend.cc

index 70c268e83aff1c9dfa0c2e7b0788d6e14e18f424..0812003bb311a2362bc19435be2d628264f83452 100644 (file)
@@ -357,7 +357,7 @@ seastar::future<PushOp> ReplicatedRecoveryBackend::build_push_op(
                          recovery_info.version,
                          PushOp(),
     [this, &recovery_info, &progress, stat]
-    (auto& new_progress, auto& available, auto& v, auto& pop) {
+    (auto new_progress, auto available, auto v, auto pop) {
     return read_metadata_for_push_op(recovery_info.soid,
                                      progress, new_progress,
                                      v, &pop).then([&](eversion_t local_ver) mutable {