Retrieved from https://patch-diff.githubusercontent.com/raw/pokerth/pokerth/pull/396.patch From a769887330a317d55e7f64c71a32ad130ffb9307 Mon Sep 17 00:00:00 2001 From: Stefan Strogin Date: Mon, 18 May 2020 03:30:53 +0300 Subject: [PATCH] Fix using boost placeholders (#395) --- src/net/common/serveracceptwebhelper.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/net/common/serveracceptwebhelper.cpp b/src/net/common/serveracceptwebhelper.cpp index f61d4d779..8701e1e99 100644 --- a/src/net/common/serveracceptwebhelper.cpp +++ b/src/net/common/serveracceptwebhelper.cpp @@ -29,6 +29,7 @@ * as that of the covered work. * *****************************************************************************/ +#include #include #include #include @@ -58,10 +59,10 @@ ServerAcceptWebHelper::Listen(unsigned serverPort, bool /*ipv6*/, const std::str m_webSocketServer->init_asio(m_ioService.get()); - m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, _1)); - m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, _1)); - m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, _1)); - m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, _1, _2)); + m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, boost::placeholders::_1)); + m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, boost::placeholders::_1)); + m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, boost::placeholders::_1)); + m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, boost::placeholders::_1, boost::placeholders::_2)); m_webSocketServer->listen(serverPort); m_webSocketServer->start_accept(); el: Use the --quick option....This prevents Emacs from loading the autoload definitions found in its profile, which needlessly clutters the output. It also prevents Geiser (if installed) from blocking the script and asking the user to input the Scheme implementation to use. The trick for passing multiple arguments to Emacs is to use what is called a "sesquicolon" (see https://www.emacswiki.org/emacs/EmacsScripts). * etc/indent-code.el.in: Rename to... * etc/indent-code.el: ...this. Adapt the shebang to use a sesquicolon, and pass the --quick option to Emacs. Since this line is interpreted by the shell, simply use Emacs from the PATH instead of from a hard coded location. (main): New procedure, used as the entry point. * configure.ac: Remove the warning about Emacs. Emacs can now be installed any time by the user if they want to use the script. * .gitignore: No longer ignore changes to etc/indent-code.el. Maxim Cournoyer