]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: use structured binding
authorKefu Chai <kchai@redhat.com>
Tue, 17 Aug 2021 06:09:48 +0000 (14:09 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 17 Aug 2021 06:27:09 +0000 (14:27 +0800)
for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/seastore/test_randomblock_manager.cc

index 8065cd7b65962f7fa290df1bd730d75f68fd1fb6..e6e93897e6531c3d411cc78b7b71a1d1f503d925 100644 (file)
@@ -116,11 +116,11 @@ struct rbm_test_t : public  seastar_test_suite_t,
   }
 
   auto free_extent(rbm_transaction &t, interval_set<blk_id_t> 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);
     }
   }