2009-04-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Rewritten RequestGroupMan::calculateStat()
	* src/RequestGroupMan.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-04-23 12:06:26 +00:00
parent 23415927e9
commit 82a38a7e3c
2 changed files with 11 additions and 2 deletions

View File

@ -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.

View File

@ -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> >&