diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-10-14 12:13:52 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-10-14 12:13:52 +0200 |
commit | b7386f5b5031b2e75fb4370069935d7f6a0eedbb (patch) | |
tree | f50f0b1f6e428ac8296da906926463dea3e30bf0 | |
parent | f9e6d94be56fab6d1d8e281e48bb5d6091562acb (diff) |
To insert to associateive STL containers value_type used instead of make_pair
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r-- | src/ctx.cpp | 4 | ||||
-rw-r--r-- | src/pgm_receiver.cpp | 2 | ||||
-rw-r--r-- | src/socket_base.cpp | 2 | ||||
-rw-r--r-- | src/xrep.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp index eb4b412..f6e62a7 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -247,8 +247,8 @@ int zmq::ctx_t::register_endpoint (const char *addr_, { endpoints_sync.lock (); - bool inserted = endpoints.insert (std::make_pair (std::string (addr_), - socket_)).second; + bool inserted = endpoints.insert (endpoints_t::value_type ( + std::string (addr_), socket_)).second; if (!inserted) { errno = EADDRINUSE; endpoints_sync.unlock (); diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp index b0e92f9..30a28ce 100644 --- a/src/pgm_receiver.cpp +++ b/src/pgm_receiver.cpp @@ -179,7 +179,7 @@ void zmq::pgm_receiver_t::in_event () // New peer. Add it to the list of know but unjoint peers. if (it == peers.end ()) { peer_info_t peer_info = {false, NULL}; - it = peers.insert (std::make_pair (*tsi, peer_info)).first; + it = peers.insert (peers_t::value_type (*tsi, peer_info)).first; } // Read the offset of the fist message in the current packet. diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 8ff2a6a..2293701 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -562,7 +562,7 @@ bool zmq::socket_base_t::register_session (const blob_t &name_, { sessions_sync.lock (); bool registered = sessions.insert ( - std::make_pair (name_, session_)).second; + sessions_t::value_type (name_, session_)).second; sessions_sync.unlock (); return registered; } diff --git a/src/xrep.cpp b/src/xrep.cpp index a9e2cc9..b0ac601 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -56,7 +56,7 @@ void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_, // TODO: What if new connection has same peer identity as the old one? outpipe_t outpipe = {outpipe_, true}; - bool ok = outpipes.insert (std::make_pair ( + bool ok = outpipes.insert (outpipes_t::value_type ( peer_identity_, outpipe)).second; zmq_assert (ok); |