From e9b42cb1fb03fe0fbb12a20acf76e634cf25a5c4 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 2 Mar 2021 19:54:41 +0100 Subject: [PATCH] dnsdist: Prevent a copy in DownstreamConnectionsManager::clear() We don't care about performance in that place but it prevents a warning. --- pdns/dnsdist-tcp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.47.2