replace 2 lambdas with partial functions

This commit is contained in:
Daniel Micay 2012-09-09 18:19:44 -04:00
parent 7168c5fcc4
commit 8f3c799b01
1 changed files with 4 additions and 6 deletions

View File

@ -11,6 +11,8 @@
#include "url_regex.h"
using namespace std::placeholders;
enum class overlay_mode {
hidden,
search,
@ -240,9 +242,7 @@ static void move_backward(VteTerminal *vte, select_info *select, F is_word) {
}
static void move_backward_word(VteTerminal *vte, select_info *select) {
move_backward(vte, select, [vte](gunichar c) {
return vte_terminal_is_word_char(vte, c);
});
move_backward(vte, select, std::bind(vte_terminal_is_word_char, vte, _1));
}
static void move_backward_blank_word(VteTerminal *vte, select_info *select) {
@ -296,9 +296,7 @@ static void move_forward(VteTerminal *vte, select_info *select, F is_word) {
}
static void move_forward_word(VteTerminal *vte, select_info *select) {
move_forward(vte, select, [vte](gunichar c) {
return vte_terminal_is_word_char(vte, c);
});
move_forward(vte, select, std::bind(vte_terminal_is_word_char, vte, _1));
}
static void move_forward_blank_word(VteTerminal *vte, select_info *select) {