for better performance, also silences the warning like:
../src/crimson/os/seastore/random_block_manager/nvme_manager.cc:444:23: warning: loop variable ‘b’ creates a copy from type ‘const crimson::os::seastore::rbm_alloc_delta_t’ [-Wrange-loop-construct]
444 | for (const auto b : alloc_blocks) {
| ^
Signed-off-by: Kefu Chai <kchai@redhat.com>
});
}).safe_then([this, &alloc_blocks]() mutable {
int alloc_block_count = 0;
- for (const auto b : alloc_blocks) {
+ for (const auto& b : alloc_blocks) {
for (interval_set<blk_id_t>::const_iterator r = b.alloc_blk_ids.begin();
r != b.alloc_blk_ids.end(); ++r) {
if (b.op == rbm_alloc_delta_t::op_types_t::SET) {