Problem: pointee types are unnecessarily non-const

Solution: add const where possible
This commit is contained in:
Simon Giesecke
2020-02-04 12:37:31 +01:00
parent db8f4fba21
commit 495fb00b7e
27 changed files with 67 additions and 58 deletions

View File

@@ -545,7 +545,8 @@ int zmq::zmtp_engine_t::process_command_message (msg_t *msg_)
if (unlikely (msg_->size () < cmd_name_size + sizeof (cmd_name_size)))
return -1;
uint8_t *cmd_name = (static_cast<uint8_t *> (msg_->data ())) + 1;
const uint8_t *const cmd_name =
static_cast<const uint8_t *> (msg_->data ()) + 1;
if (cmd_name_size == ping_name_size
&& memcmp (cmd_name, "PING", cmd_name_size) == 0)
msg_->set_flags (zmq::msg_t::ping);