From 1d598558d8f4c02b5bb42458fa7d796dc032b47b Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Tue, 18 Nov 2014 08:10:39 -0500 Subject: [PATCH] code style, correct more STL includes --- websocketpp/transport/asio/connection.hpp | 21 ++++++++++++------- websocketpp/transport/asio/endpoint.hpp | 10 +++++++-- websocketpp/transport/asio/security/base.hpp | 4 ++-- websocketpp/transport/asio/security/none.hpp | 4 +++- websocketpp/transport/asio/security/tls.hpp | 2 ++ websocketpp/transport/base/connection.hpp | 3 ++- websocketpp/transport/base/endpoint.hpp | 5 ----- websocketpp/transport/iostream/connection.hpp | 13 ++++++++---- websocketpp/transport/iostream/endpoint.hpp | 10 +++++---- websocketpp/transport/stub/connection.hpp | 13 ++++++++---- 10 files changed, 54 insertions(+), 31 deletions(-) diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp index f434101..0be40f6 100644 --- a/websocketpp/transport/asio/connection.hpp +++ b/websocketpp/transport/asio/connection.hpp @@ -28,22 +28,27 @@ #ifndef WEBSOCKETPP_TRANSPORT_ASIO_CON_HPP #define WEBSOCKETPP_TRANSPORT_ASIO_CON_HPP -#include -#include -#include -#include +#include + +#include + #include #include -#include -#include #include #include +#include +#include +#include +#include + #include #include +#include #include +#include #include namespace websocketpp { @@ -243,7 +248,7 @@ public: if (ec) { throw exception(ec); } } - const std::string & get_proxy() const { + std::string const & get_proxy() const { return m_proxy; } @@ -899,7 +904,7 @@ protected: ); } - void async_write(const std::vector& bufs, write_handler handler) { + void async_write(std::vector const & bufs, write_handler handler) { if (!m_async_write_handler) { m_alog.write(log::alevel::devel, "async_write (vector) called after async_shutdown"); diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp index 9464ced..b8cbeb4 100644 --- a/websocketpp/transport/asio/endpoint.hpp +++ b/websocketpp/transport/asio/endpoint.hpp @@ -28,16 +28,22 @@ #ifndef WEBSOCKETPP_TRANSPORT_ASIO_HPP #define WEBSOCKETPP_TRANSPORT_ASIO_HPP -#include -#include #include #include #include +#include +#include + +#include + #include #include #include +#include +#include + namespace websocketpp { namespace transport { namespace asio { diff --git a/websocketpp/transport/asio/security/base.hpp b/websocketpp/transport/asio/security/base.hpp index 0b49417..be3fa16 100644 --- a/websocketpp/transport/asio/security/base.hpp +++ b/websocketpp/transport/asio/security/base.hpp @@ -104,7 +104,7 @@ namespace error { /// Error category related to asio transport socket policies class socket_category : public lib::error_category { public: - const char *name() const _WEBSOCKETPP_NOEXCEPT_TOKEN_ { + char const * name() const _WEBSOCKETPP_NOEXCEPT_TOKEN_ { return "websocketpp.transport.asio.socket"; } @@ -132,7 +132,7 @@ public: } }; -inline const lib::error_category& get_socket_category() { +inline lib::error_category const & get_socket_category() { static socket_category instance; return instance; } diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp index 17ddbf6..14b6f8b 100644 --- a/websocketpp/transport/asio/security/none.hpp +++ b/websocketpp/transport/asio/security/none.hpp @@ -28,11 +28,13 @@ #ifndef WEBSOCKETPP_TRANSPORT_SECURITY_NONE_HPP #define WEBSOCKETPP_TRANSPORT_SECURITY_NONE_HPP -#include #include +#include + #include +#include #include namespace websocketpp { diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp index 68f4198..8434a5c 100644 --- a/websocketpp/transport/asio/security/tls.hpp +++ b/websocketpp/transport/asio/security/tls.hpp @@ -29,6 +29,7 @@ #define WEBSOCKETPP_TRANSPORT_SECURITY_TLS_HPP #include + #include #include #include @@ -37,6 +38,7 @@ #include #include +#include #include namespace websocketpp { diff --git a/websocketpp/transport/base/connection.hpp b/websocketpp/transport/base/connection.hpp index 774c60d..2a1cc20 100644 --- a/websocketpp/transport/base/connection.hpp +++ b/websocketpp/transport/base/connection.hpp @@ -31,9 +31,10 @@ #include #include #include -#include #include +#include + namespace websocketpp { /// Transport policies provide network connectivity and timers /** diff --git a/websocketpp/transport/base/endpoint.hpp b/websocketpp/transport/base/endpoint.hpp index 43bbdf4..3b4b0d6 100644 --- a/websocketpp/transport/base/endpoint.hpp +++ b/websocketpp/transport/base/endpoint.hpp @@ -28,13 +28,8 @@ #ifndef WEBSOCKETPP_TRANSPORT_BASE_HPP #define WEBSOCKETPP_TRANSPORT_BASE_HPP -#include -#include #include #include -#include - -#include namespace websocketpp { /// Transport policies provide network connectivity and timers diff --git a/websocketpp/transport/iostream/connection.hpp b/websocketpp/transport/iostream/connection.hpp index cbd802e..b57830a 100644 --- a/websocketpp/transport/iostream/connection.hpp +++ b/websocketpp/transport/iostream/connection.hpp @@ -28,15 +28,20 @@ #ifndef WEBSOCKETPP_TRANSPORT_IOSTREAM_CON_HPP #define WEBSOCKETPP_TRANSPORT_IOSTREAM_CON_HPP +#include + +#include + +#include + #include #include #include -#include - -#include -#include +#include +#include #include +#include #include namespace websocketpp { diff --git a/websocketpp/transport/iostream/endpoint.hpp b/websocketpp/transport/iostream/endpoint.hpp index 6a83b3b..06cac4e 100644 --- a/websocketpp/transport/iostream/endpoint.hpp +++ b/websocketpp/transport/iostream/endpoint.hpp @@ -28,13 +28,15 @@ #ifndef WEBSOCKETPP_TRANSPORT_IOSTREAM_HPP #define WEBSOCKETPP_TRANSPORT_IOSTREAM_HPP -#include -#include - #include #include -#include +#include +#include + +#include + +#include namespace websocketpp { namespace transport { diff --git a/websocketpp/transport/stub/connection.hpp b/websocketpp/transport/stub/connection.hpp index ce3bdcc..fa06f30 100644 --- a/websocketpp/transport/stub/connection.hpp +++ b/websocketpp/transport/stub/connection.hpp @@ -28,13 +28,18 @@ #ifndef WEBSOCKETPP_TRANSPORT_STUB_CON_HPP #define WEBSOCKETPP_TRANSPORT_STUB_CON_HPP +#include + +#include + +#include + #include #include #include -#include -#include -#include +#include +#include namespace websocketpp { namespace transport { @@ -183,7 +188,7 @@ protected: * @param handler The callback to invoke when the operation is complete or * ends in an error */ - void async_read_at_least(size_t num_bytes, char *buf, size_t len, + void async_read_at_least(size_t num_bytes, char * buf, size_t len, read_handler handler) { m_alog.write(log::alevel::devel, "stub_con async_read_at_least");