Skip to content

Commit 0723bf7

Browse files
Hello71gauteh
authored andcommitted
use std::placeholders everywhere
before this was silently relying on boost placeholders, but those default off now.
1 parent fd387d9 commit 0723bf7

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

src/config.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ namespace Astroid {
488488
void Config::merge_ptree(const ptree &pt) {
489489
function<void(const ptree &,
490490
const ptree::path_type &,
491-
const ptree&)> method = bind (&Config::merge, this, _1, _2, _3);
491+
const ptree&)> method = bind (&Config::merge, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
492492

493493
traverse(pt, method);
494494
}

src/main_window.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,52 +260,52 @@ namespace Astroid {
260260
keys.register_key ("M-1",
261261
"main_window.jump_to_page_1",
262262
"Jump to page 1",
263-
bind (&MainWindow::jump_to_page, this, _1, 1));
263+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 1));
264264

265265
keys.register_key ("M-2",
266266
"main_window.jump_to_page_2",
267267
"Jump to page 2",
268-
bind (&MainWindow::jump_to_page, this, _1, 2));
268+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 2));
269269

270270
keys.register_key ("M-3",
271271
"main_window.jump_to_page_3",
272272
"Jump to page 3",
273-
bind (&MainWindow::jump_to_page, this, _1, 3));
273+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 3));
274274

275275
keys.register_key ("M-4",
276276
"main_window.jump_to_page_4",
277277
"Jump to page 4",
278-
bind (&MainWindow::jump_to_page, this, _1, 4));
278+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 4));
279279

280280
keys.register_key ("M-5",
281281
"main_window.jump_to_page_5",
282282
"Jump to page 5",
283-
bind (&MainWindow::jump_to_page, this, _1, 5));
283+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 5));
284284

285285
keys.register_key ("M-6",
286286
"main_window.jump_to_page_6",
287287
"Jump to page 6",
288-
bind (&MainWindow::jump_to_page, this, _1, 6));
288+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 6));
289289

290290
keys.register_key ("M-7",
291291
"main_window.jump_to_page_7",
292292
"Jump to page 7",
293-
bind (&MainWindow::jump_to_page, this, _1, 7));
293+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 7));
294294

295295
keys.register_key ("M-8",
296296
"main_window.jump_to_page_8",
297297
"Jump to page 8",
298-
bind (&MainWindow::jump_to_page, this, _1, 8));
298+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 8));
299299

300300
keys.register_key ("M-9",
301301
"main_window.jump_to_page_9",
302302
"Jump to page 9",
303-
bind (&MainWindow::jump_to_page, this, _1, 9));
303+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 9));
304304

305305
keys.register_key ("M-0",
306306
"main_window.jump_to_page_0",
307307
"Jump to page 0",
308-
bind (&MainWindow::jump_to_page, this, _1, 0));
308+
bind (&MainWindow::jump_to_page, this, std::placeholders::_1, 0));
309309

310310
keys.register_key ("C-w", "main_window.close_page",
311311
"Close mode (or window if other windows are open)",

src/modes/keybindings.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ namespace Astroid {
561561
register_key (b->first,
562562
b->first.name,
563563
ustring::compose ("Run hook: %1,%2", b->second.first, b->second.second),
564-
bind (cb, _1, b->second.first, b->second.second)
564+
bind (cb, std::placeholders::_1, b->second.first, b->second.second)
565565
);
566566

567567
b++;

src/modes/thread_index/thread_index_list_view.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -477,38 +477,38 @@ namespace Astroid {
477477
multi_keys.register_key ("N",
478478
"thread_index.multi.mark_unread",
479479
"Toggle unread",
480-
bind (&ThreadIndexListView::multi_key_handler, this, MUnread, _1));
480+
bind (&ThreadIndexListView::multi_key_handler, this, MUnread, std::placeholders::_1));
481481

482482
multi_keys.register_key ("*",
483483
"thread_index.multi.flag",
484484
"Toggle flagged",
485-
bind (&ThreadIndexListView::multi_key_handler, this, MFlag, _1));
485+
bind (&ThreadIndexListView::multi_key_handler, this, MFlag, std::placeholders::_1));
486486

487487
multi_keys.register_key ("a",
488488
"thread_index.multi.archive",
489489
"Toggle archive",
490-
bind (&ThreadIndexListView::multi_key_handler, this, MArchive, _1));
490+
bind (&ThreadIndexListView::multi_key_handler, this, MArchive, std::placeholders::_1));
491491

492492
multi_keys.register_key ("S",
493493
"thread_index.multi.mark_spam",
494494
"Toggle spam",
495-
bind (&ThreadIndexListView::multi_key_handler, this, MSpam, _1));
495+
bind (&ThreadIndexListView::multi_key_handler, this, MSpam, std::placeholders::_1));
496496

497497
multi_keys.register_key ("+",
498498
"thread_index.multi.tag",
499499
"Tag",
500-
bind (&ThreadIndexListView::multi_key_handler, this, MTag, _1));
500+
bind (&ThreadIndexListView::multi_key_handler, this, MTag, std::placeholders::_1));
501501

502502

503503
multi_keys.register_key ("C-m",
504504
"thread_index.multi.mute",
505505
"Toggle mute",
506-
bind (&ThreadIndexListView::multi_key_handler, this, MMute, _1));
506+
bind (&ThreadIndexListView::multi_key_handler, this, MMute, std::placeholders::_1));
507507

508508
multi_keys.register_key ("t",
509509
"thread_index.multi.toggle",
510510
"Toggle marked",
511-
bind (&ThreadIndexListView::multi_key_handler, this, MToggle, _1));
511+
bind (&ThreadIndexListView::multi_key_handler, this, MToggle, std::placeholders::_1));
512512

513513
keys->register_key (Key (GDK_KEY_semicolon),
514514
"thread_index.multi",

0 commit comments

Comments
 (0)