Update Cluster.cpp

This commit is contained in:
alexey-milovidov 2018-11-21 07:06:40 +03:00 committed by GitHub
parent af8db3e9ec
commit 0bc9776e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,10 +410,10 @@ Cluster::Cluster(const Cluster & from, const std::vector<size_t> & indices)
{ {
for (size_t index : indices) for (size_t index : indices)
{ {
shards_info.push_back(from.shards_info[index]); shards_info.emplace_back(from.shards_info.at(index));
if (!from.addresses_with_failover.empty()) if (!from.addresses_with_failover.empty())
addresses_with_failover.emplace_back(from.addresses_with_failover[index]); addresses_with_failover.emplace_back(from.addresses_with_failover.at(index));
} }
initMisc(); initMisc();