mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
copy elimination for ranges #part4
This commit is contained in:
parent
a530503c0c
commit
94642f9066
4 changed files with 26 additions and 28 deletions
8
UPnP.cpp
8
UPnP.cpp
|
@ -122,8 +122,8 @@ namespace transport
|
|||
|
||||
void UPnP::PortMapping ()
|
||||
{
|
||||
auto a = context.GetRouterInfo().GetAddresses();
|
||||
for (auto address : a)
|
||||
const auto& a = context.GetRouterInfo().GetAddresses();
|
||||
for (const auto& address : a)
|
||||
{
|
||||
if (!address->host.is_v6 ())
|
||||
TryPortMapping (address);
|
||||
|
@ -139,8 +139,8 @@ namespace transport
|
|||
|
||||
void UPnP::CloseMapping ()
|
||||
{
|
||||
auto a = context.GetRouterInfo().GetAddresses();
|
||||
for (auto address : a)
|
||||
const auto& a = context.GetRouterInfo().GetAddresses();
|
||||
for (const auto& address : a)
|
||||
{
|
||||
if (!address->host.is_v6 ())
|
||||
CloseMapping (address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue