diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-09-04 11:40:48 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-09-04 11:40:48 +0000 |
commit | fd8d29f8e1ebb51decaccee71aa6119275c11be1 (patch) | |
tree | 9330d2ca829717fe27a53344ddc9a9e9bfc1f4bb /storage | |
parent | c3ee6199624f99eb695a0d397b800a0fd6ab326d (diff) |
Unify and modernize code and layout
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/distributor/activecopy.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/src/vespa/storage/distributor/activecopy.cpp b/storage/src/vespa/storage/distributor/activecopy.cpp index 4c35d42a0e7..4659142ddb5 100644 --- a/storage/src/vespa/storage/distributor/activecopy.cpp +++ b/storage/src/vespa/storage/distributor/activecopy.cpp @@ -132,7 +132,7 @@ ActiveCopy::calculate(const Node2Index & idealState, const lib::Distribution& di { IndexList validNodesWithCopy = buildValidNodeIndexList(e); if (validNodesWithCopy.empty()) { - return ActiveList(); + return {}; } std::vector<IndexList> groups; if (distribution.activePerGroup()) { @@ -162,7 +162,7 @@ ActiveCopy::calculate(const Node2Index & idealState, const lib::Distribution& di } result.emplace_back(*best); } - return ActiveList(std::move(result)); + return {std::move(result)}; } void @@ -170,8 +170,8 @@ ActiveList::print(std::ostream& out, bool verbose, const std::string& indent) co { out << "["; if (verbose) { - for (size_t i=0; i<_v.size(); ++i) { - out << "\n" << indent << " " << _v[i].nodeIndex() << " " << _v[i].getReason(); + for (auto i : _v) { + out << "\n" << indent << " " << i.nodeIndex() << " " << i.getReason(); } if (!_v.empty()) { out << "\n" << indent; |