to silence warning from clang13 with -std=c++20, like
ceph/src/crimson/osd/replicated_recovery_backend.cc:1098:21: warning: loop variable '[off, len]' creates a copy from type 'const std::pair<const unsigned long, unsigned long>' [-Wrange-loop-construct]
for (const auto [off, len] : extents) {
^
ceph/src/crimson/osd/replicated_recovery_backend.cc:1098:10: note: use reference type 'const std::pair<const unsigned long, unsigned long> &' to prevent copying
for (const auto [off, len] : extents) {
^~~~~~~~~~~~~~~~~~~~~~~
&
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
ObjectStore::Transaction *t)
{
for (const auto& [oid, extents] : recovery_info.clone_subset) {
- for (const auto [off, len] : extents) {
+ for (const auto& [off, len] : extents) {
logger().debug(" clone_range {} {}~{}", oid, off, len);
t->clone_range(coll->get_cid(), ghobject_t(oid), ghobject_t(recovery_info.soid),
off, len, off);