Browse Source

eliminate extra copy

pull/797/head
orignal 8 years ago
parent
commit
d2edbfd6fa
  1. 3
      TunnelGateway.cpp

3
TunnelGateway.cpp

@ -203,7 +203,8 @@ namespace tunnel @@ -203,7 +203,8 @@ namespace tunnel
{
m_Buffer.CompleteCurrentTunnelDataMessage ();
std::vector<std::shared_ptr<I2NPMessage> > newTunnelMsgs;
for (auto& tunnelMsg : m_Buffer.GetTunnelDataMsgs ())
const auto& tunnelDataMsgs = m_Buffer.GetTunnelDataMsgs ();
for (auto& tunnelMsg : tunnelDataMsgs)
{
auto newMsg = CreateEmptyTunnelDataMsg ();
m_Tunnel->EncryptTunnelMsg (tunnelMsg, newMsg);

Loading…
Cancel
Save