From: Remi Gacogne Date: Tue, 2 Mar 2021 18:54:41 +0000 (+0100) Subject: dnsdist: Prevent a copy in DownstreamConnectionsManager::clear() X-Git-Tag: dnsdist-1.6.0-alpha2~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10134%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Prevent a copy in DownstreamConnectionsManager::clear() We don't care about performance in that place but it prevents a warning. --- diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index 0258585445..57ca6926da 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -136,7 +136,7 @@ public: static size_t clear() { size_t count = 0; - for (const auto downstream : t_downstreamConnections) { + for (const auto& downstream : t_downstreamConnections) { count += downstream.second.size(); }