mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 14:42:30 +00:00
* 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:
+14
-6
@@ -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)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user