Const correctness and const-ref in Crypto and elsewhere.

This commit is contained in:
John Hood
2015-12-25 22:18:04 -05:00
parent 13928e9c10
commit 6abd4739de
16 changed files with 46 additions and 46 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ string Packet::tostring( Session *session )
return session->encrypt( Message( Nonce( direction_seq ), timestamps + payload ) );
}
Packet Connection::new_packet( string &s_payload )
Packet Connection::new_packet( const string &s_payload )
{
uint16_t outgoing_timestamp_reply = -1;
@@ -391,7 +391,7 @@ Connection::Connection( const char *key_str, const char *ip, const char *port )
set_MTU( remote_addr.sa.sa_family );
}
void Connection::send( string s )
void Connection::send( const string & s )
{
if ( !has_remote_addr ) {
return;