mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 19:22:29 +00:00
replace various find_if calls
C++11 has shorter equivalents. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jari Sundell
parent
47089bce70
commit
f0517e2748
@@ -119,9 +119,9 @@ WindowHttpQueue::receive_insert(torrent::net::HttpGet http_get) {
|
||||
|
||||
void
|
||||
WindowHttpQueue::receive_erase(torrent::net::HttpGet http_get) {
|
||||
Container::iterator itr = std::find_if(m_container.begin(),
|
||||
m_container.end(),
|
||||
[http_get](Node& n) { return http_get == n.m_http; });
|
||||
auto itr = std::find_if(m_container.begin(),
|
||||
m_container.end(),
|
||||
[http_get](auto& n) { return http_get == n.m_http; });
|
||||
|
||||
if (itr == m_container.end())
|
||||
throw std::logic_error("WindowHttpQueue::receive_erase(...) tried to remove an object we don't have");
|
||||
|
||||
Reference in New Issue
Block a user