Add const qualifier to register_endpoint param

This commit is contained in:
Martin Hurton 2014-05-23 10:53:58 +02:00
parent 99dba23dc7
commit dd2be381ad
5 changed files with 8 additions and 5 deletions

View File

@ -349,7 +349,8 @@ zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_)
return selected_io_thread; return selected_io_thread;
} }
int zmq::ctx_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) int zmq::ctx_t::register_endpoint (const char *addr_,
const endpoint_t &endpoint_)
{ {
endpoints_sync.lock (); endpoints_sync.lock ();

View File

@ -99,7 +99,7 @@ namespace zmq
zmq::object_t *get_reaper (); zmq::object_t *get_reaper ();
// Management of inproc endpoints. // Management of inproc endpoints.
int register_endpoint (const char *addr_, endpoint_t &endpoint_); int register_endpoint (const char *addr_, const endpoint_t &endpoint_);
void unregister_endpoints (zmq::socket_base_t *socket_); void unregister_endpoints (zmq::socket_base_t *socket_);
endpoint_t find_endpoint (const char *addr_); endpoint_t find_endpoint (const char *addr_);
void pend_connection (const std::string &addr_, void pend_connection (const std::string &addr_,

View File

@ -137,7 +137,8 @@ void zmq::object_t::process_command (command_t &cmd_)
} }
} }
int zmq::object_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) int zmq::object_t::register_endpoint (const char *addr_,
const endpoint_t &endpoint_)
{ {
return ctx->register_endpoint (addr_, endpoint_); return ctx->register_endpoint (addr_, endpoint_);
} }

View File

@ -59,7 +59,8 @@ namespace zmq
// Using following function, socket is able to access global // Using following function, socket is able to access global
// repository of inproc endpoints. // repository of inproc endpoints.
int register_endpoint (const char *addr_, zmq::endpoint_t &endpoint_); int register_endpoint (const char *addr_,
const zmq::endpoint_t &endpoint_);
void unregister_endpoints (zmq::socket_base_t *socket_); void unregister_endpoints (zmq::socket_base_t *socket_);
zmq::endpoint_t find_endpoint (const char *addr_); zmq::endpoint_t find_endpoint (const char *addr_);
void pend_connection (const std::string &addr_, void pend_connection (const std::string &addr_,

View File

@ -365,7 +365,7 @@ int zmq::socket_base_t::bind (const char *addr_)
return -1; return -1;
if (protocol == "inproc") { if (protocol == "inproc") {
endpoint_t endpoint = {this, options}; const endpoint_t endpoint = { this, options };
int rc = register_endpoint (addr_, endpoint); int rc = register_endpoint (addr_, endpoint);
if (rc == 0) { if (rc == 0) {
connect_pending(addr_, this); connect_pending(addr_, this);