mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 22:52:31 +00:00
clang-tidy: convert loops to range based
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jari Sundell
parent
bb8d677f6e
commit
0948b5f86a
@@ -34,11 +34,10 @@ typedef torrent::FileManager FM_t;
|
||||
torrent::Object
|
||||
apply_pieces_stats_total_size() {
|
||||
uint64_t size = 0;
|
||||
core::DownloadList* d_list = control->core()->download_list();
|
||||
|
||||
for (core::DownloadList::iterator itr = d_list->begin(), last = d_list->end(); itr != last; itr++)
|
||||
if ((*itr)->is_active())
|
||||
size += (*itr)->file_list()->size_bytes();
|
||||
for (const auto& d : *control->core()->download_list())
|
||||
if (d->is_active())
|
||||
size += d->file_list()->size_bytes();
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user