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>
|
2009-04-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Removed unnecessary virtual destructor for Request class.
|
Removed unnecessary virtual destructor for Request class.
|
||||||
|
|
|
@ -566,8 +566,12 @@ void RequestGroupMan::forceHalt()
|
||||||
|
|
||||||
TransferStat RequestGroupMan::calculateStat()
|
TransferStat RequestGroupMan::calculateStat()
|
||||||
{
|
{
|
||||||
return std::accumulate(_requestGroups.begin(), _requestGroups.end(), TransferStat(),
|
TransferStat s;
|
||||||
adopt2nd(std::plus<TransferStat>(), mem_fun_sh(&RequestGroup::calculateStat)));
|
for(std::deque<SharedHandle<RequestGroup> >::const_iterator i =
|
||||||
|
_requestGroups.begin(); i != _requestGroups.end(); ++i) {
|
||||||
|
s += (*i)->calculateStat();
|
||||||
|
}
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::deque<SharedHandle<DownloadResult> >&
|
const std::deque<SharedHandle<DownloadResult> >&
|
||||||
|
|
Loading…
Reference in New Issue