diff options
Diffstat (limited to 'src/DownloadEngine.cc')
| -rw-r--r-- | src/DownloadEngine.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/DownloadEngine.cc b/src/DownloadEngine.cc index e2c42ed8..57753758 100644 --- a/src/DownloadEngine.cc +++ b/src/DownloadEngine.cc @@ -49,6 +49,7 @@ #include "a2time.h" #include "Socket.h" #include "Util.h" +#include "a2functional.h" #include <signal.h> #include <cstring> #include <algorithm> @@ -96,14 +97,6 @@ DownloadEngine::~DownloadEngine() { cleanQueue(); } -class Deleter { -public: - template<class T> - void operator()(T* ptr) { - delete ptr; - } -}; - void DownloadEngine::cleanQueue() { std::for_each(commands.begin(), commands.end(), Deleter()); commands.clear(); @@ -311,7 +304,9 @@ void DownloadEngine::requestHalt() void DownloadEngine::fillCommand() { - addCommand(_requestGroupMan->getInitialCommands(this)); + std::deque<Command*> commands; + _requestGroupMan->getInitialCommands(commands, this); + addCommand(commands); } void DownloadEngine::setStatCalc(const StatCalcHandle& statCalc) |
