mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
Problem: unnecessary value parameters
Solution: change to const references
This commit is contained in:
parent
cb2b377d9f
commit
f8adf9ea55
@ -130,7 +130,7 @@ void zmq::socks_choice_decoder_t::reset ()
|
||||
|
||||
|
||||
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_),
|
||||
password (password_)
|
||||
{
|
||||
@ -306,7 +306,7 @@ void zmq::socks_request_encoder_t::reset ()
|
||||
}
|
||||
|
||||
zmq::socks_response_t::socks_response_t (uint8_t response_code_,
|
||||
std::string address_,
|
||||
const std::string &address_,
|
||||
uint16_t port_) :
|
||||
response_code (response_code_),
|
||||
address (address_),
|
||||
|
@ -84,7 +84,8 @@ class socks_choice_decoder_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 password;
|
||||
@ -152,7 +153,7 @@ class socks_request_encoder_t
|
||||
struct socks_response_t
|
||||
{
|
||||
socks_response_t (uint8_t response_code_,
|
||||
std::string address_,
|
||||
const std::string &address_,
|
||||
uint16_t port_);
|
||||
uint8_t response_code;
|
||||
std::string address;
|
||||
|
@ -79,8 +79,8 @@ void zmq::socks_connecter_t::set_auth_method_none ()
|
||||
_auth_password.clear ();
|
||||
}
|
||||
|
||||
void zmq::socks_connecter_t::set_auth_method_basic (const std::string username_,
|
||||
const std::string password_)
|
||||
void zmq::socks_connecter_t::set_auth_method_basic (
|
||||
const std::string &username_, const std::string &password_)
|
||||
{
|
||||
_auth_method = socks_basic_auth;
|
||||
_auth_username = username_;
|
||||
|
@ -54,8 +54,8 @@ class socks_connecter_t : public stream_connecter_base_t
|
||||
bool delayed_start_);
|
||||
~socks_connecter_t ();
|
||||
|
||||
void set_auth_method_basic (const std::string username,
|
||||
const std::string password);
|
||||
void set_auth_method_basic (const std::string &username,
|
||||
const std::string &password);
|
||||
void set_auth_method_none ();
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user