From: Kefu Chai Date: Sat, 27 Jun 2020 11:30:35 +0000 (+0800) Subject: kv/RocksDBStore: use structured binding for better readablity X-Git-Tag: v16.1.0~1874^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f75e60b6a8cb977b83348e30d33f34d116c836a0;p=ceph.git kv/RocksDBStore: use structured binding for better readablity Signed-off-by: Kefu Chai --- diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index 030ca7fed8ab9..70066027733aa 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -2911,12 +2911,12 @@ int RocksDBStore::reshard_cleanup(const std::vector& current_column const std::vector& current_handles) { std::vector new_sharding_columns; - for (const auto& col: cf_handles) { - if (col.second.handles.size() == 1) { - new_sharding_columns.push_back(col.first); + for (const auto& [name, handle] : cf_handles) { + if (handle.handles.size() == 1) { + new_sharding_columns.push_back(name); } else { - for (size_t i = 0; i < col.second.handles.size(); i++) { - new_sharding_columns.push_back(col.first + "-" + to_string(i)); + for (size_t i = 0; i < handle.handles.size(); i++) { + new_sharding_columns.push_back(name + "-" + to_string(i)); } } }