mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 13:12:32 +00:00
replace for_each with range loops
No advantage over the latter, which is simpler. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jari Sundell
parent
8b663dd169
commit
84c0d516ef
@@ -63,7 +63,8 @@ ElementPeerList::ElementPeerList(core::Download* d) :
|
||||
|
||||
torrent::ConnectionList* connection_list = m_download->download()->connection_list();
|
||||
|
||||
std::for_each(connection_list->begin(), connection_list->end(), [&](torrent::Peer* peer) { m_list.push_back(peer); });
|
||||
for (auto peer : *connection_list)
|
||||
m_list.push_back(peer);
|
||||
|
||||
m_peer_connected = connection_list->signal_connected().insert(connection_list->signal_connected().end(),
|
||||
std::bind(&ElementPeerList::receive_peer_connected, this, std::placeholders::_1));
|
||||
|
||||
Reference in New Issue
Block a user