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

@@ -93,7 +93,8 @@ int zmq::tipc_listener_t::set_local_address (const char *addr_)
return -1;
// Cannot bind non-random Port Identity
struct sockaddr_tipc *a = (sockaddr_tipc *) _address.addr ();
const sockaddr_tipc *const a =
reinterpret_cast<const sockaddr_tipc *> (_address.addr ());
if (!_address.is_random () && a->addrtype == TIPC_ADDR_ID) {
errno = EINVAL;
return -1;