* Removed ticks for downloads, use the global tick instead.

* Fixed rak::priority_queue.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@608 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-12-15 22:56:03 +00:00
parent 7cc377b550
commit ca5b5e05ec
19 changed files with 145 additions and 106 deletions
+14 -6
View File
@@ -98,13 +98,21 @@ void
Manager::do_update() {
Canvas::refresh_std();
std::list<rak::priority_item*> workQueue;
// std::list<rak::priority_item*> workQueue;
std::copy(rak::queue_popper(displayScheduler, rak::bind2nd(std::mem_fun(&rak::priority_item::compare), cachedTime)),
rak::queue_popper(displayScheduler, rak::bind2nd(std::mem_fun(&rak::priority_item::compare), rak::timer())),
std::back_inserter(workQueue));
std::for_each(workQueue.begin(), workQueue.end(), std::mem_fun(&rak::priority_item::clear));
std::for_each(workQueue.begin(), workQueue.end(), std::mem_fun(&rak::priority_item::call));
// std::copy(rak::queue_popper(displayScheduler, rak::bind2nd(std::mem_fun(&rak::priority_item::compare), cachedTime)),
// rak::queue_popper(displayScheduler, rak::bind2nd(std::mem_fun(&rak::priority_item::compare), rak::timer())),
// std::back_inserter(workQueue));
// std::for_each(workQueue.begin(), workQueue.end(), std::mem_fun(&rak::priority_item::clear_time));
// std::for_each(workQueue.begin(), workQueue.end(), std::mem_fun(&rak::priority_item::call));
while (!displayScheduler.empty() && displayScheduler.top()->time() <= cachedTime) {
rak::priority_item* v = displayScheduler.top();
displayScheduler.pop();
v->clear_time();
v->call();
}
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), std::mem_fun(&Window::refresh)));