mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-01 10:57:59 +01:00
Made to_string const; converted C-style cast to reinterpret_cast
This commit is contained in:
parent
737927e333
commit
a1b6268c83
@ -75,7 +75,7 @@ int zmq::ipc_address_t::resolve (const char *path_)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int zmq::ipc_address_t::to_string (std::string &addr_)
|
||||
int zmq::ipc_address_t::to_string (std::string &addr_) const
|
||||
{
|
||||
if (address.sun_family != AF_UNIX) {
|
||||
addr_.clear ();
|
||||
@ -94,7 +94,7 @@ int zmq::ipc_address_t::to_string (std::string &addr_)
|
||||
|
||||
const sockaddr *zmq::ipc_address_t::addr () const
|
||||
{
|
||||
return (sockaddr *) &address;
|
||||
return reinterpret_cast<const sockaddr *> (&address);
|
||||
}
|
||||
|
||||
socklen_t zmq::ipc_address_t::addrlen () const
|
||||
|
@ -51,7 +51,7 @@ class ipc_address_t
|
||||
int resolve (const char *path_);
|
||||
|
||||
// The opposite to resolve()
|
||||
int to_string (std::string &addr_);
|
||||
int to_string (std::string &addr_) const;
|
||||
|
||||
const sockaddr *addr () const;
|
||||
socklen_t addrlen () const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user