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

@@ -236,11 +236,11 @@ bool zmq::trie_t::rm (unsigned char *prefix_, size_t size_)
return ret;
}
bool zmq::trie_t::check (const unsigned char *data_, size_t size_)
bool zmq::trie_t::check (const unsigned char *data_, size_t size_) const
{
// This function is on critical path. It deliberately doesn't use
// recursion to get a bit better performance.
trie_t *current = this;
const trie_t *current = this;
while (true) {
// We've found a corresponding subscription!
if (current->_refcnt)