mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 23:01:04 +08:00
Problem: parameters not const where const possible
Solution: add const
This commit is contained in:
parent
84267e734b
commit
fdabd73da6
@ -616,7 +616,9 @@ int zmq::thread_ctx_t::set (int option_, const void *optval_, size_t optvallen_)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int zmq::thread_ctx_t::get (int option_, void *optval_, size_t *optvallen_)
|
||||
int zmq::thread_ctx_t::get (int option_,
|
||||
void *optval_,
|
||||
const size_t *optvallen_)
|
||||
{
|
||||
const bool is_int = (*optvallen_ == sizeof (int));
|
||||
int *value = static_cast<int *> (optval_);
|
||||
|
@ -73,7 +73,7 @@ class thread_ctx_t
|
||||
const char *name_ = NULL) const;
|
||||
|
||||
int set (int option_, const void *optval_, size_t optvallen_);
|
||||
int get (int option_, void *optval_, size_t *optvallen_);
|
||||
int get (int option_, void *optval_, const size_t *optvallen_);
|
||||
|
||||
protected:
|
||||
// Synchronisation of access to context options.
|
||||
|
@ -85,7 +85,7 @@ int zmq::do_getsockopt (void *const optval_,
|
||||
|
||||
#ifdef ZMQ_HAVE_CURVE
|
||||
static int do_getsockopt_curve_key (void *const optval_,
|
||||
size_t *const optvallen_,
|
||||
const size_t *const optvallen_,
|
||||
const uint8_t (&curve_key_)[CURVE_KEYSIZE])
|
||||
{
|
||||
if (*optvallen_ == CURVE_KEYSIZE) {
|
||||
|
@ -100,9 +100,9 @@ static void zap_handler_large_routing_id (void * /*unused_*/)
|
||||
zap_handler_generic (zap_ok, large_routing_id);
|
||||
}
|
||||
|
||||
void expect_new_client_curve_bounce_fail (char *server_public_,
|
||||
char *client_public_,
|
||||
char *client_secret_,
|
||||
void expect_new_client_curve_bounce_fail (const char *server_public_,
|
||||
const char *client_public_,
|
||||
const char *client_secret_,
|
||||
char *my_endpoint_,
|
||||
void *server_,
|
||||
void **client_mon_ = NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user