From: Kefu Chai Date: Sun, 20 Dec 2020 16:50:50 +0000 (+0800) Subject: crimson/osd: declare variables captured by do_with() using "auto" X-Git-Tag: v16.1.0~146^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7cbc54096d8b65daee70367faf8123f864b9d031;p=ceph.git crimson/osd: declare variables captured by do_with() using "auto" 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 --- diff --git a/src/crimson/osd/replicated_recovery_backend.cc b/src/crimson/osd/replicated_recovery_backend.cc index 70c268e83af..0812003bb31 100644 --- a/src/crimson/osd/replicated_recovery_backend.cc +++ b/src/crimson/osd/replicated_recovery_backend.cc @@ -357,7 +357,7 @@ seastar::future 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 {