From 58b0c0ef34c0e20071f051a1f08df95d7f07cf45 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sat, 10 Aug 2013 00:43:55 -0700 Subject: [PATCH] Fix c++0x errors --- .../beast_asio/tests/beast_TestPeerType.h | 2 +- .../sockets/ripple_MultiSocketType.h | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Subtrees/beast/modules/beast_asio/tests/beast_TestPeerType.h b/Subtrees/beast/modules/beast_asio/tests/beast_TestPeerType.h index 97b4fab46f..c76b154e32 100644 --- a/Subtrees/beast/modules/beast_asio/tests/beast_TestPeerType.h +++ b/Subtrees/beast/modules/beast_asio/tests/beast_TestPeerType.h @@ -67,8 +67,8 @@ public: , Logic (get_socket ()) , Thread (name ()) , m_timer (get_io_service ()) - , m_timed_out (false) , m_timer_set (false) + , m_timed_out (false) { } diff --git a/modules/ripple_asio/sockets/ripple_MultiSocketType.h b/modules/ripple_asio/sockets/ripple_MultiSocketType.h index a5701558a4..2f37bec6f3 100644 --- a/modules/ripple_asio/sockets/ripple_MultiSocketType.h +++ b/modules/ripple_asio/sockets/ripple_MultiSocketType.h @@ -498,7 +498,7 @@ public: createPlainStreamSocket (); } - BOOST_ASIO_INITFN_RESULT_TYPE(ErrorCall, void (boost::system::error_code)) + BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (boost::system::error_code)) handshakePlainAsync (BOOST_ASIO_MOVE_ARG(ErrorCall) handler) { createPlainStreamSocket (); @@ -519,7 +519,7 @@ public: m_ssl_stream->handshake (m_role, ec); } - BOOST_ASIO_INITFN_RESULT_TYPE(ErrorCall, void (boost::system::error_code)) + BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (boost::system::error_code)) handshakeSslAsync (BOOST_ASIO_MOVE_ARG(ErrorCall) handler) { createSslStreamSocket (); @@ -528,7 +528,7 @@ public: } #if BEAST_ASIO_HAS_BUFFEREDHANDSHAKE - BOOST_ASIO_INITFN_RESULT_TYPE(TransferCall, void (boost::system::error_code, std::size_t)) + BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (boost::system::error_code, std::size_t)) handshakePlainAsync (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG (TransferCall) handler) { @@ -545,7 +545,7 @@ public: m_ssl_stream->handshake (m_role, buffers, ec); } - BOOST_ASIO_INITFN_RESULT_TYPE (TransferCall, void (boost::system::error_code, std::size_t)) + BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (boost::system::error_code, std::size_t)) handshakeSslAsync (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler) { createSslStreamSocket (); @@ -589,7 +589,7 @@ public: //-------------------------------------------------------------------------- - void onDetectRead (BOOST_ASIO_MOVE_ARG(ErrorCall) handler, + void onDetectRead (ErrorCall handler, boost::system::error_code const& ec, std::size_t bytes_transferred) { m_buffer.commit (bytes_transferred); @@ -634,19 +634,18 @@ public: } } - BOOST_ASIO_INITFN_RESULT_TYPE(ErrorCall, void (boost::system::error_code)) + BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (boost::system::error_code)) detectHandshakeAsync (BOOST_ASIO_MOVE_ARG(ErrorCall) handler) { bassert (m_buffer.size () == 0); return m_next_layer.async_receive ( m_buffer.prepare (autoDetectBytes), boost::asio::socket_base::message_peek, - m_strand.wrap (boost::bind (&ThisType::onDetectRead, this, - BOOST_ASIO_MOVE_CAST(ErrorCall)(handler), - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred))); + m_strand.wrap (boost::bind (&ThisType::onDetectRead, this, handler, + boost::asio::placeholders::error, 0))); } #if BEAST_ASIO_HAS_BUFFEREDHANDSHAKE - BOOST_ASIO_INITFN_RESULT_TYPE(TransferCall, void (boost::system::error_code, std::size_t)) + BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (boost::system::error_code, std::size_t)) detectHandshakeAsync (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler) { fatal_error ("unimplemented");