Commit f8adf9ea authored by Simon Giesecke's avatar Simon Giesecke Committed by Simon Giesecke

Problem: unnecessary value parameters

Solution: change to const references
parent cb2b377d
...@@ -130,7 +130,7 @@ void zmq::socks_choice_decoder_t::reset () ...@@ -130,7 +130,7 @@ void zmq::socks_choice_decoder_t::reset ()
zmq::socks_basic_auth_request_t::socks_basic_auth_request_t ( zmq::socks_basic_auth_request_t::socks_basic_auth_request_t (
std::string username_, std::string password_) : const std::string &username_, const std::string &password_) :
username (username_), username (username_),
password (password_) password (password_)
{ {
...@@ -306,7 +306,7 @@ void zmq::socks_request_encoder_t::reset () ...@@ -306,7 +306,7 @@ void zmq::socks_request_encoder_t::reset ()
} }
zmq::socks_response_t::socks_response_t (uint8_t response_code_, zmq::socks_response_t::socks_response_t (uint8_t response_code_,
std::string address_, const std::string &address_,
uint16_t port_) : uint16_t port_) :
response_code (response_code_), response_code (response_code_),
address (address_), address (address_),
......
...@@ -84,7 +84,8 @@ class socks_choice_decoder_t ...@@ -84,7 +84,8 @@ class socks_choice_decoder_t
struct socks_basic_auth_request_t struct socks_basic_auth_request_t
{ {
socks_basic_auth_request_t (std::string username_, std::string password_); socks_basic_auth_request_t (const std::string &username_,
const std::string &password_);
const std::string username; const std::string username;
const std::string password; const std::string password;
...@@ -152,7 +153,7 @@ class socks_request_encoder_t ...@@ -152,7 +153,7 @@ class socks_request_encoder_t
struct socks_response_t struct socks_response_t
{ {
socks_response_t (uint8_t response_code_, socks_response_t (uint8_t response_code_,
std::string address_, const std::string &address_,
uint16_t port_); uint16_t port_);
uint8_t response_code; uint8_t response_code;
std::string address; std::string address;
......
...@@ -79,8 +79,8 @@ void zmq::socks_connecter_t::set_auth_method_none () ...@@ -79,8 +79,8 @@ void zmq::socks_connecter_t::set_auth_method_none ()
_auth_password.clear (); _auth_password.clear ();
} }
void zmq::socks_connecter_t::set_auth_method_basic (const std::string username_, void zmq::socks_connecter_t::set_auth_method_basic (
const std::string password_) const std::string &username_, const std::string &password_)
{ {
_auth_method = socks_basic_auth; _auth_method = socks_basic_auth;
_auth_username = username_; _auth_username = username_;
......
...@@ -54,8 +54,8 @@ class socks_connecter_t : public stream_connecter_base_t ...@@ -54,8 +54,8 @@ class socks_connecter_t : public stream_connecter_base_t
bool delayed_start_); bool delayed_start_);
~socks_connecter_t (); ~socks_connecter_t ();
void set_auth_method_basic (const std::string username, void set_auth_method_basic (const std::string &username,
const std::string password); const std::string &password);
void set_auth_method_none (); void set_auth_method_none ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment