From: Kefu Chai Date: Sat, 5 Jun 2021 09:22:35 +0000 (+0800) Subject: crimson/os/seastore: use structured binding X-Git-Tag: v17.1.0~1733^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ca48d1cbdb657f6fd661b5fabbba8dbe9eb9e427;p=ceph.git crimson/os/seastore: use structured binding for better readability Signed-off-by: Kefu Chai --- diff --git a/src/crimson/os/seastore/collection_manager/collection_flat_node.cc b/src/crimson/os/seastore/collection_manager/collection_flat_node.cc index 1cd440d2b6b..bb8754e58eb 100644 --- a/src/crimson/os/seastore/collection_manager/collection_flat_node.cc +++ b/src/crimson/os/seastore/collection_manager/collection_flat_node.cc @@ -48,13 +48,9 @@ CollectionNode::list() { read_to_local(); logger().debug("CollectionNode:{}, {}", __func__, *this); - std::vector> list_result; - for (auto &&it : decoded) { - list_result.emplace_back( - std::make_pair( - static_cast(it.first), - coll_info_t{ it.second } - )); + CollectionManager::list_ret_bare list_result; + for (auto &[coll, bits] : decoded) { + list_result.emplace_back(coll, bits); } return list_ret( list_ertr::ready_future_marker{},