From d32f345aeedc213813f615bef23549322c048469 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 19 Mar 2014 12:16:05 -0400 Subject: [PATCH] don't copy temporary data structure --- TunnelGateway.cpp | 2 +- TunnelGateway.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TunnelGateway.cpp b/TunnelGateway.cpp index cc1189e0..c85e92e6 100644 --- a/TunnelGateway.cpp +++ b/TunnelGateway.cpp @@ -107,7 +107,7 @@ namespace tunnel } } - std::vector TunnelGatewayBuffer::GetTunnelDataMsgs () + const std::vector TunnelGatewayBuffer::GetTunnelDataMsgs () { CompleteCurrentTunnelDataMessage (); std::vector ret = m_TunnelDataMsgs; // TODO: implement it better diff --git a/TunnelGateway.h b/TunnelGateway.h index 8c390eef..aec0ca03 100644 --- a/TunnelGateway.h +++ b/TunnelGateway.h @@ -16,7 +16,7 @@ namespace tunnel TunnelGatewayBuffer (uint32_t tunnelID): m_TunnelID (tunnelID), m_CurrentTunnelDataMsg (nullptr), m_RemainingSize (0) {}; void PutI2NPMsg (const TunnelMessageBlock& block); - std::vector GetTunnelDataMsgs (); + const std::vector GetTunnelDataMsgs (); private: