mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 21:52:30 +00:00
Seperated out my template algorithms and stuff.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@334 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
|
||||
#include "utils/functional.h"
|
||||
#include "rak/functional.h"
|
||||
|
||||
#include "canvas.h"
|
||||
#include "manager.h"
|
||||
@@ -26,8 +26,8 @@ Manager::adjust_layout() {
|
||||
int countDynamic = 0;
|
||||
int staticHeight = 0;
|
||||
|
||||
std::for_each(begin(), end(), utils::if_then(std::mem_fun(&Window::is_active), utils::accumulate(staticHeight, std::mem_fun(&Window::get_min_height))));
|
||||
std::for_each(begin(), end(), utils::if_then(std::mem_fun(&Window::is_active), utils::accumulate(countDynamic, std::mem_fun(&Window::is_dynamic))));
|
||||
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), rak::accumulate(staticHeight, std::mem_fun(&Window::get_min_height))));
|
||||
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), rak::accumulate(countDynamic, std::mem_fun(&Window::is_dynamic))));
|
||||
|
||||
int dynamic = std::max(0, Canvas::get_screen_height() - staticHeight);
|
||||
int height = 0, h;
|
||||
@@ -56,9 +56,9 @@ void
|
||||
Manager::do_update() {
|
||||
Canvas::refresh_std();
|
||||
|
||||
std::for_each(begin(), end(), utils::if_then(std::mem_fun(&Window::is_active), utils::if_then(std::mem_fun(&Window::is_dirty),
|
||||
std::mem_fun(&Window::redraw))));
|
||||
std::for_each(begin(), end(), utils::if_then(std::mem_fun(&Window::is_active), std::mem_fun(&Window::refresh)));
|
||||
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), rak::if_then(std::mem_fun(&Window::is_dirty),
|
||||
std::mem_fun(&Window::redraw))));
|
||||
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), std::mem_fun(&Window::refresh)));
|
||||
|
||||
Canvas::do_update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user