From: Otto Moerbeek Date: Tue, 5 Sep 2023 10:40:50 +0000 (+0200) Subject: Use at(i) instead of [i] X-Git-Tag: rec-5.0.0-alpha1~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13208%2Fhead;p=thirdparty%2Fpdns.git Use at(i) instead of [i] --- diff --git a/pdns/dnsdistdist/dnsdist-lbpolicies.cc b/pdns/dnsdistdist/dnsdist-lbpolicies.cc index 2a890f2e55..783b5ae21a 100644 --- a/pdns/dnsdistdist/dnsdist-lbpolicies.cc +++ b/pdns/dnsdistdist/dnsdist-lbpolicies.cc @@ -41,7 +41,7 @@ template static std::shared_ptr 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++; } } @@ -101,7 +101,7 @@ template static std::shared_ptr 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++; } }