Commit b4436183 authored by Thomas Rodgers's avatar Thomas Rodgers

Code cleanup

std::map::insert() has always had range based insertion, removed
explicit loops.
parent 7d224d78
...@@ -813,19 +813,11 @@ void zmq::stream_engine_t::mechanism_ready () ...@@ -813,19 +813,11 @@ void zmq::stream_engine_t::mechanism_ready ()
// Add ZAP properties. // Add ZAP properties.
const properties_t& zap_properties = mechanism->get_zap_properties (); const properties_t& zap_properties = mechanism->get_zap_properties ();
it = zap_properties.begin (); properties.insert(zap_properties.begin(), zap_properties.end());
while (it != zap_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second));
++it;
}
// Add ZMTP properties. // Add ZMTP properties.
const properties_t& zmtp_properties = mechanism->get_zmtp_properties (); const properties_t& zmtp_properties = mechanism->get_zmtp_properties ();
it = zmtp_properties.begin (); properties.insert(zmtp_properties.begin(), zmtp_properties.end ());
while (it != zmtp_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second));
++it;
}
zmq_assert (metadata == NULL); zmq_assert (metadata == NULL);
if (!properties.empty ()) if (!properties.empty ())
......
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