From 5ee090c322039a47717115674fb7cdd409b6a1fa Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 5 Sep 2023 12:40:50 +0200 Subject: [PATCH] Use at(i) instead of [i] --- pdns/dnsdistdist/dnsdist-lbpolicies.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++; } } -- 2.47.2