From 52ff45549d2b706f7de07e3767bd1a986444fe2e Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sun, 18 Aug 2013 16:50:16 -0700 Subject: [PATCH] Make HandlerCall operator() const --- modules/beast_asio/basics/beast_HandlerCall.cpp | 6 +++--- modules/beast_asio/basics/beast_HandlerCall.h | 6 +++--- modules/beast_asio/sockets/beast_Socket.cpp | 2 +- modules/beast_asio/sockets/beast_SocketWrapper.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/beast_asio/basics/beast_HandlerCall.cpp b/modules/beast_asio/basics/beast_HandlerCall.cpp index 4c208fea0b..ce20265a63 100644 --- a/modules/beast_asio/basics/beast_HandlerCall.cpp +++ b/modules/beast_asio/basics/beast_HandlerCall.cpp @@ -259,17 +259,17 @@ HandlerCall const& HandlerCall::endComposed () const noexcept return *this; } -void HandlerCall::operator() () +void HandlerCall::operator() () const { (*m_call)(); } -void HandlerCall::operator() (error_code const& ec) +void HandlerCall::operator() (error_code const& ec) const { (*m_call)(ec); } -void HandlerCall::operator() (error_code const& ec, std::size_t bytes_transferred) +void HandlerCall::operator() (error_code const& ec, std::size_t bytes_transferred) const { (*m_call)(ec, bytes_transferred); } diff --git a/modules/beast_asio/basics/beast_HandlerCall.h b/modules/beast_asio/basics/beast_HandlerCall.h index 15769c2714..2fc0cb150e 100644 --- a/modules/beast_asio/basics/beast_HandlerCall.h +++ b/modules/beast_asio/basics/beast_HandlerCall.h @@ -397,9 +397,9 @@ public: error at run-time. */ /** @{ */ - void operator() (); - void operator() (error_code const& ec); - void operator() (error_code const& ec, std::size_t bytes_transferred); + void operator() () const; + void operator() (error_code const& ec) const; + void operator() (error_code const& ec, std::size_t bytes_transferred) const; /** @} */ //-------------------------------------------------------------------------- diff --git a/modules/beast_asio/sockets/beast_Socket.cpp b/modules/beast_asio/sockets/beast_Socket.cpp index 33349e8ae8..d6e858bb00 100644 --- a/modules/beast_asio/sockets/beast_Socket.cpp +++ b/modules/beast_asio/sockets/beast_Socket.cpp @@ -152,7 +152,7 @@ boost::system::error_code Socket::handshake (handshake_type, boost::system::erro } BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (boost::system::error_code)) -Socket::async_handshake (handshake_type, BOOST_ASIO_MOVE_ARG(HandlerCall) handler) +Socket::async_handshake (handshake_type, HandlerCall const& handler) { #if BEAST_ASIO_HAS_FUTURE_RETURNS boost::asio::detail::async_result_init< diff --git a/modules/beast_asio/sockets/beast_SocketWrapper.h b/modules/beast_asio/sockets/beast_SocketWrapper.h index bd7ab80cf4..d72833d061 100644 --- a/modules/beast_asio/sockets/beast_SocketWrapper.h +++ b/modules/beast_asio/sockets/beast_SocketWrapper.h @@ -699,7 +699,7 @@ public: } BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code)) - async_shutdown (BOOST_ASIO_MOVE_ARG(HandlerCall) handler, + async_shutdown (HandlerCall const& handler, boost::true_type) { return m_object.async_shutdown (handler);