Skip to content

Commit

Permalink
Use at(i) instead of [i]
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Sep 5, 2023
1 parent 0b0882f commit 5ee090c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdns/dnsdistdist/dnsdist-lbpolicies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ template <class T> static std::shared_ptr<DownstreamState> getLeastOutstanding(c
size_t usableServers = 0;
for (const auto& d : servers) {
if (d.second->isUp()) {
poss[usableServers] = std::pair(std::tuple(d.second->outstanding.load(), d.second->d_config.order, d.second->getRelevantLatencyUsec()), d.first);
poss.at(usableServers) = std::pair(std::tuple(d.second->outstanding.load(), d.second->d_config.order, d.second->getRelevantLatencyUsec()), d.first);
usableServers++;
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ template <class T> static std::shared_ptr<DownstreamState> getValRandom(const Se
sum += d.second->d_config.d_weight;
}

poss[usableServers] = std::pair(sum, d.first);
poss.at(usableServers) = std::pair(sum, d.first);
usableServers++;
}
}
Expand Down

0 comments on commit 5ee090c

Please sign in to comment.