mirror of https://github.com/aria2/aria2
2009-04-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten RequestGroupMan::calculateStat() * src/RequestGroupMan.ccpull/1/head
parent
23415927e9
commit
82a38a7e3c
|
@ -1,3 +1,8 @@
|
|||
2009-04-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Rewritten RequestGroupMan::calculateStat()
|
||||
* src/RequestGroupMan.cc
|
||||
|
||||
2009-04-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Removed unnecessary virtual destructor for Request class.
|
||||
|
|
|
@ -566,8 +566,12 @@ void RequestGroupMan::forceHalt()
|
|||
|
||||
TransferStat RequestGroupMan::calculateStat()
|
||||
{
|
||||
return std::accumulate(_requestGroups.begin(), _requestGroups.end(), TransferStat(),
|
||||
adopt2nd(std::plus<TransferStat>(), mem_fun_sh(&RequestGroup::calculateStat)));
|
||||
TransferStat s;
|
||||
for(std::deque<SharedHandle<RequestGroup> >::const_iterator i =
|
||||
_requestGroups.begin(); i != _requestGroups.end(); ++i) {
|
||||
s += (*i)->calculateStat();
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
const std::deque<SharedHandle<DownloadResult> >&
|
||||
|
|
Loading…
Reference in New Issue