copy elimination for ranges #part3

This commit is contained in:
brain5lug 2016-08-09 01:53:37 +03:00
parent 8b53ded53a
commit a530503c0c
9 changed files with 45 additions and 49 deletions

View file

@ -213,7 +213,7 @@ namespace tunnel
void CreatePeers (const Peers& peers)
{
TunnelHopConfig * prev = nullptr;
for (auto it: peers)
for (const auto& it: peers)
{
auto hop = new TunnelHopConfig (it);
if (prev)