From c2892f82e1d4d5ed046f4ee9cf1955bb97f27021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 6 Feb 2021 21:40:07 +0100 Subject: Avoid unnecessary copying in range loops --- src/channel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/channel.cpp') diff --git a/src/channel.cpp b/src/channel.cpp index b13a71e..787fb08 100644 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -14,7 +14,7 @@ Ref ChannelRequestData::store(const Storage & st) const { vector items; - for (const auto p : peers) + for (const auto & p : peers) items.emplace_back("peer", p); items.emplace_back("enc", "aes-128-gcm"); items.emplace_back("key", key); @@ -94,7 +94,7 @@ Ref Channel::store(const Storage & st) const { vector items; - for (const auto p : peers) + for (const auto & p : peers) items.emplace_back("peer", p); items.emplace_back("enc", "aes-128-gcm"); items.emplace_back("key", key); -- cgit v1.2.3