Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jyrkive/13ffb7c4bb2b7105c9eedd514bf5b4fc to your computer and use it in GitHub Desktop.
Save jyrkive/13ffb7c4bb2b7105c9eedd514bf5b4fc to your computer and use it in GitHub Desktop.
From a470ae39a62c58568d64ac87035ed87acd165d53 Mon Sep 17 00:00:00 2001
From: Jyrki Vesterinen <[email protected]>
Date: Sun, 24 Jul 2016 08:03:22 +0300
Subject: [PATCH] Remove two uses of boost::bind()
---
src/gui/dialogs/multiplayer/mp_create_game.cpp | 4 ++--
src/hotkey/command_executor.cpp | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/gui/dialogs/multiplayer/mp_create_game.cpp b/src/gui/dialogs/multiplayer/mp_create_game.cpp
index 7944954..3667029 100644
--- a/src/gui/dialogs/multiplayer/mp_create_game.cpp
+++ b/src/gui/dialogs/multiplayer/mp_create_game.cpp
@@ -83,9 +83,9 @@ void tmp_create_game::pre_show(twindow& window)
tlistbox& list = find_widget<tlistbox>(&window, "map_list", false);
#ifdef GUI2_EXPERIMENTAL_LISTBOX
connect_signal_notify_modified(list,
- boost::bind(&tmp_create_game::update_map,
+ std::bind(&tmp_create_game::update_map,
*this,
- boost::ref(window)));
+ std::ref(window)));
#else
list.set_callback_value_change(
dialog_callback<tmp_create_game, &tmp_create_game::update_map>);
diff --git a/src/hotkey/command_executor.cpp b/src/hotkey/command_executor.cpp
index fe595fe..f0b3fb7 100644
--- a/src/hotkey/command_executor.cpp
+++ b/src/hotkey/command_executor.cpp
@@ -735,6 +735,10 @@ void command_executor_default::zoom_default()
}
void command_executor_default::map_screenshot()
{
- make_screenshot(_("Map-Screenshot"), get_video(), boost::bind(&display::screenshot, &get_display(), _1, true));
+ make_screenshot(_("Map-Screenshot"), get_video(),
+ [this](const std::string& filename, const CVideo&)
+ {
+ return get_display().screenshot(filename, true);
+ });
}
}
--
2.9.0.windows.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment