Problem: unnecessary non-const variables

Solution: add const
This commit is contained in:
Simon Giesecke
2018-05-18 18:05:25 +02:00
parent d6952ded71
commit 440be28d7e
7 changed files with 23 additions and 17 deletions

View File

@@ -89,7 +89,8 @@ void zmq::xpub_t::xread_activated (pipe_t *pipe_)
msg_t sub;
while (pipe_->read (&sub)) {
// Apply the subscription to the trie
unsigned char *const data = static_cast<unsigned char *> (sub.data ());
const unsigned char *const data =
static_cast<const unsigned char *> (sub.data ());
const size_t size = sub.size ();
metadata_t *metadata = sub.metadata ();
if (size > 0 && (*data == 0 || *data == 1)) {