summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-09-04 17:00:01 +0200
committerGitHub <noreply@github.com>2023-09-04 17:00:01 +0200
commit1deac7adfaa6583a19cfe564de07deca2a0835b0 (patch)
tree5877cccf6f0459e5f2cb5eb03cd01c96f46a4bca /storage
parent03d68b13d0cf62446631bb7856307892200e43af (diff)
parent601af030f40b9b7d270e59fbff68dbf32583fef4 (diff)
Merge pull request #28376 from vespa-engine/balder/minor-cleanup
Unify and modernize code and layout
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/distributor/activecopy.cpp8
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..e9d6d8cca30 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 (const auto & copy : _v) {
+ out << "\n" << indent << " " << copy.nodeIndex() << " " << copy.getReason();
}
if (!_v.empty()) {
out << "\n" << indent;