From: Kefu Chai Date: Tue, 17 Aug 2021 06:09:48 +0000 (+0800) Subject: test/crimson: use structured binding X-Git-Tag: v17.1.0~1097^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4f542f7c0239fd851753ba5db6c272713ca8d0c;p=ceph.git test/crimson: use structured binding for better readability Signed-off-by: Kefu Chai --- diff --git a/src/test/crimson/seastore/test_randomblock_manager.cc b/src/test/crimson/seastore/test_randomblock_manager.cc index 8065cd7b65962..e6e93897e6531 100644 --- a/src/test/crimson/seastore/test_randomblock_manager.cc +++ b/src/test/crimson/seastore/test_randomblock_manager.cc @@ -116,11 +116,11 @@ struct rbm_test_t : public seastar_test_suite_t, } auto free_extent(rbm_transaction &t, interval_set range) { - for (auto r : range) { - logger().debug("free_extent: start {} len {}", r.first * DEFAULT_BLOCK_SIZE, - r.second * DEFAULT_BLOCK_SIZE); - rbm_manager->add_free_extent(t.allocated_blocks, r.first * DEFAULT_BLOCK_SIZE, - r.second * DEFAULT_BLOCK_SIZE); + for (auto [off, len] : range) { + logger().debug("free_extent: start {} len {}", off * DEFAULT_BLOCK_SIZE, + len * DEFAULT_BLOCK_SIZE); + rbm_manager->add_free_extent(t.allocated_blocks, off * DEFAULT_BLOCK_SIZE, + len * DEFAULT_BLOCK_SIZE); } }