mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 22:52:31 +00:00
cleanup: Changes for c++17
This cleanup adjusts the rTorrent code to comply with c++17 standard. It also simplifies various parts of the code.
This commit is contained in:
@@ -199,7 +199,7 @@ print_download_status(char* first, char* last, core::Download* d) {
|
||||
} else if (d->tracker_list()->has_active_not_scrape()) {
|
||||
torrent::TrackerList::iterator itr =
|
||||
std::find_if(d->tracker_list()->begin(), d->tracker_list()->end(),
|
||||
std::mem_fun(&torrent::Tracker::is_busy_not_scrape));
|
||||
std::mem_fn(&torrent::Tracker::is_busy_not_scrape));
|
||||
char status[128];
|
||||
|
||||
(*itr)->get_status(status, sizeof(status));
|
||||
|
||||
@@ -110,7 +110,7 @@ WindowDownloadChunksSeen::redraw() {
|
||||
if (bitfield->get(chunk - seen)) {
|
||||
attr = A_NORMAL;
|
||||
} else if (itrTransfer != transferChunks.end() && (uint32_t)(chunk - seen) == (*itrTransfer)->index()) {
|
||||
if (std::find_if((*itrTransfer)->begin(), (*itrTransfer)->end(), std::mem_fun_ref(&torrent::Block::is_transfering)) != (*itrTransfer)->end())
|
||||
if (std::any_of((*itrTransfer)->begin(), (*itrTransfer)->end(), std::mem_fn(&torrent::Block::is_transfering)))
|
||||
attr = A_REVERSE;
|
||||
else
|
||||
attr = A_BOLD | A_UNDERLINE;
|
||||
|
||||
Reference in New Issue
Block a user