libi2pd: use std::move and pass by value

Found with clang-tidy's modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-01-19 19:07:10 -08:00
parent 6cc388c1bc
commit 4b2badf97c
No known key found for this signature in database
GPG key ID: 36D31CFA845F0E3B
6 changed files with 15 additions and 8 deletions
libi2pd

View file

@ -2,6 +2,7 @@
#include "I2PEndian.h"
#include <map>
#include <string>
#include <utility>
#include "Crypto.h"
#include "RouterContext.h"
#include "I2NPProtocol.h"
@ -61,7 +62,7 @@ namespace garlic
ElGamalAESSession::ElGamalAESSession (GarlicDestination * owner,
std::shared_ptr<const i2p::data::RoutingDestination> destination, int numTags, bool attachLeaseSet):
GarlicRoutingSession (owner, attachLeaseSet),
m_Destination (destination), m_NumTags (numTags)
m_Destination (std::move(destination)), m_NumTags (numTags)
{
// create new session tags and session key
RAND_bytes (m_SessionKey, 32);