Commit 8b82ed50 authored by Luca Boccassi's avatar Luca Boccassi

Problem: Solaris Studio does not convert from char * to string

Solution: do it explicitly to fix build on Solaris 10/11 with the Sun
compiler
parent 3d9c1195
......@@ -503,7 +503,8 @@ int zmq::ctx_t::register_endpoint (const char *addr_,
scoped_lock_t locker (endpoints_sync);
const bool inserted =
endpoints.ZMQ_MAP_INSERT_OR_EMPLACE (addr_, endpoint_).second;
endpoints.ZMQ_MAP_INSERT_OR_EMPLACE (std::string (addr_), endpoint_)
.second;
if (!inserted) {
errno = EADDRINUSE;
return -1;
......
......@@ -62,7 +62,8 @@ void zmq::mechanism_t::set_user_id (const void *data_, size_t size_)
{
user_id.set (static_cast<const unsigned char *> (data_), size_);
zap_properties.ZMQ_MAP_INSERT_OR_EMPLACE (
ZMQ_MSG_PROPERTY_USER_ID, std::string ((char *) data_, size_));
std::string (ZMQ_MSG_PROPERTY_USER_ID),
std::string ((char *) data_, size_));
}
const zmq::blob_t &zmq::mechanism_t::get_user_id () const
......
......@@ -783,7 +783,7 @@ int zmq::socket_base_t::connect (const char *addr_)
last_endpoint.assign (addr_);
// remember inproc connections for disconnect
inprocs.ZMQ_MAP_INSERT_OR_EMPLACE (addr_, new_pipes[0]);
inprocs.ZMQ_MAP_INSERT_OR_EMPLACE (std::string (addr_), new_pipes[0]);
options.connected = true;
return 0;
......@@ -982,7 +982,7 @@ void zmq::socket_base_t::add_endpoint (const char *addr_,
{
// Activate the session. Make it a child of this socket.
launch_child (endpoint_);
endpoints.ZMQ_MAP_INSERT_OR_EMPLACE (addr_,
endpoints.ZMQ_MAP_INSERT_OR_EMPLACE (std::string (addr_),
endpoint_pipe_t (endpoint_, pipe));
}
......
......@@ -999,14 +999,15 @@ bool zmq::stream_engine_t::init_properties (properties_t &properties)
{
if (peer_address.empty ())
return false;
properties.ZMQ_MAP_INSERT_OR_EMPLACE (ZMQ_MSG_PROPERTY_PEER_ADDRESS,
peer_address);
properties.ZMQ_MAP_INSERT_OR_EMPLACE (
std::string (ZMQ_MSG_PROPERTY_PEER_ADDRESS), peer_address);
// Private property to support deprecated SRCFD
std::ostringstream stream;
stream << (int) s;
std::string fd_string = stream.str ();
properties.ZMQ_MAP_INSERT_OR_EMPLACE ("__fd", ZMQ_MOVE (fd_string));
properties.ZMQ_MAP_INSERT_OR_EMPLACE (std::string ("__fd"),
ZMQ_MOVE (fd_string));
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment