From 79f17e970b6f661c275ad6fe0d7ed448e5e72c27 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Thu, 27 Jun 2024 20:02:03 +1000 Subject: [PATCH] Clean up spurious white space. --- asio/include/asio/basic_datagram_socket.hpp | 6 +++--- asio/include/asio/basic_deadline_timer.hpp | 2 +- asio/include/asio/basic_raw_socket.hpp | 4 ++-- asio/include/asio/basic_waitable_timer.hpp | 2 +- asio/include/asio/buffer.hpp | 4 ++-- asio/include/asio/buffer_registration.hpp | 2 +- asio/include/asio/cancel_at.hpp | 1 - asio/include/asio/coroutine.hpp | 7 +++---- asio/include/asio/detached.hpp | 2 +- .../include/asio/detail/buffered_stream_storage.hpp | 2 +- asio/include/asio/detail/impl/dev_poll_reactor.ipp | 2 +- .../asio/detail/impl/socket_select_interrupter.ipp | 2 +- .../asio/detail/impl/win_iocp_handle_service.ipp | 10 +++++----- .../include/asio/detail/reactive_socket_send_op.hpp | 1 - asio/include/asio/detail/resolve_endpoint_op.hpp | 2 +- asio/include/asio/detail/resolve_query_op.hpp | 2 +- .../asio/detail/win_iocp_socket_service_base.hpp | 2 +- .../asio/detail/winrt_ssocket_service_base.hpp | 2 +- .../experimental/detail/coro_promise_allocator.hpp | 1 - .../asio/experimental/detail/partial_promise.hpp | 4 +--- asio/include/asio/experimental/promise.hpp | 1 - asio/include/asio/experimental/use_coro.hpp | 1 - asio/include/asio/impl/spawn.hpp | 1 - asio/include/asio/io_context_strand.hpp | 10 +++++----- asio/include/asio/ip/detail/socket_option.hpp | 2 +- asio/include/asio/redirect_error.hpp | 2 +- asio/include/asio/registered_buffer.hpp | 4 ++-- asio/include/asio/spawn.hpp | 1 - asio/include/asio/ssl/detail/impl/openssl_init.ipp | 4 ++-- asio/include/asio/ssl/impl/context.ipp | 2 +- asio/src/examples/cpp11/executors/fork_join.cpp | 2 +- asio/src/examples/cpp11/icmp/icmp_header.hpp | 2 +- asio/src/examples/cpp11/icmp/ipv4_header.hpp | 2 +- asio/src/examples/cpp11/ssl/server.cpp | 2 +- .../examples/cpp11/timeouts/blocking_udp_client.cpp | 2 +- asio/src/examples/cpp14/executors/fork_join.cpp | 2 +- .../examples/cpp14/parallel_group/parallel_sort.cpp | 2 +- .../examples/cpp20/channels/mutual_exclusion_1.cpp | 2 +- .../examples/cpp20/channels/mutual_exclusion_2.cpp | 2 +- asio/src/tests/latency/udp_client.cpp | 2 +- asio/src/tests/unit/buffers_iterator.cpp | 1 - asio/src/tests/unit/experimental/coro/allocator.cpp | 13 ++++++------- asio/src/tests/unit/experimental/coro/cancel.cpp | 1 - .../tests/unit/experimental/coro/simple_test.cpp | 5 ++--- asio/src/tests/unit/unit_test.hpp | 2 +- 45 files changed, 58 insertions(+), 72 deletions(-) diff --git a/asio/include/asio/basic_datagram_socket.hpp b/asio/include/asio/basic_datagram_socket.hpp index 3d72a38475..0210b9a05a 100644 --- a/asio/include/asio/basic_datagram_socket.hpp +++ b/asio/include/asio/basic_datagram_socket.hpp @@ -1026,7 +1026,7 @@ class basic_datagram_socket asio::detail::throw_error(ec, "receive_from"); return s; } - + /// Receive a datagram with the endpoint of the sender. /** * This function is used to receive a datagram. The function call will block @@ -1053,7 +1053,7 @@ class basic_datagram_socket asio::detail::throw_error(ec, "receive_from"); return s; } - + /// Receive a datagram with the endpoint of the sender. /** * This function is used to receive a datagram. The function call will block @@ -1219,7 +1219,7 @@ class basic_datagram_socket const basic_datagram_socket&) = delete; class initiate_async_send - { + { public: typedef Executor executor_type; diff --git a/asio/include/asio/basic_deadline_timer.hpp b/asio/include/asio/basic_deadline_timer.hpp index 9343591bf8..5eec88cec1 100644 --- a/asio/include/asio/basic_deadline_timer.hpp +++ b/asio/include/asio/basic_deadline_timer.hpp @@ -63,7 +63,7 @@ namespace asio { * timer.wait(); * @endcode * - * @par + * @par * Performing an asynchronous wait: * @code * void handler(const asio::error_code& error) diff --git a/asio/include/asio/basic_raw_socket.hpp b/asio/include/asio/basic_raw_socket.hpp index 112090900c..5a2d5da219 100644 --- a/asio/include/asio/basic_raw_socket.hpp +++ b/asio/include/asio/basic_raw_socket.hpp @@ -1019,7 +1019,7 @@ class basic_raw_socket asio::detail::throw_error(ec, "receive_from"); return s; } - + /// Receive raw data with the endpoint of the sender. /** * This function is used to receive raw data. The function call will block @@ -1046,7 +1046,7 @@ class basic_raw_socket asio::detail::throw_error(ec, "receive_from"); return s; } - + /// Receive raw data with the endpoint of the sender. /** * This function is used to receive raw data. The function call will block diff --git a/asio/include/asio/basic_waitable_timer.hpp b/asio/include/asio/basic_waitable_timer.hpp index 5e9df3ef4f..41dada6ee6 100644 --- a/asio/include/asio/basic_waitable_timer.hpp +++ b/asio/include/asio/basic_waitable_timer.hpp @@ -75,7 +75,7 @@ class basic_waitable_timer; * timer.wait(); * @endcode * - * @par + * @par * Performing an asynchronous wait (C++11): * @code * void handler(const asio::error_code& error) diff --git a/asio/include/asio/buffer.hpp b/asio/include/asio/buffer.hpp index ad49f290a6..351416e060 100644 --- a/asio/include/asio/buffer.hpp +++ b/asio/include/asio/buffer.hpp @@ -949,7 +949,7 @@ ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer( { return ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType)); } - + /// Create a new modifiable buffer that represents the given POD array. /** * @returns A mutable_buffer value equivalent to: @@ -966,7 +966,7 @@ ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer( N * sizeof(PodType) < max_size_in_bytes ? N * sizeof(PodType) : max_size_in_bytes); } - + /// Create a new non-modifiable buffer that represents the given POD array. /** * @returns A const_buffer value equivalent to: diff --git a/asio/include/asio/buffer_registration.hpp b/asio/include/asio/buffer_registration.hpp index 39897ba245..48d56f811a 100644 --- a/asio/include/asio/buffer_registration.hpp +++ b/asio/include/asio/buffer_registration.hpp @@ -129,7 +129,7 @@ class buffer_registration service_->unregister_buffers(); #endif // defined(ASIO_HAS_IO_URING) } - + /// Move assignment. buffer_registration& operator=(buffer_registration&& other) noexcept { diff --git a/asio/include/asio/cancel_at.hpp b/asio/include/asio/cancel_at.hpp index defa2aa99c..36b4c58ca6 100644 --- a/asio/include/asio/cancel_at.hpp +++ b/asio/include/asio/cancel_at.hpp @@ -119,7 +119,6 @@ class partial_cancel_at cancellation_type_t cancel_type_; }; - /// A function object type that adapts a @ref completion_token to cancel an /// operation at a given time. /** diff --git a/asio/include/asio/coroutine.hpp b/asio/include/asio/coroutine.hpp index 036e5148ad..122d76a82b 100644 --- a/asio/include/asio/coroutine.hpp +++ b/asio/include/asio/coroutine.hpp @@ -200,7 +200,7 @@ class coroutine_ref; * The @c fork pseudo-keyword is used when "forking" a coroutine, i.e. splitting * it into two (or more) copies. One use of @c fork is in a server, where a new * coroutine is created to handle each client connection: - * + * * @code reenter (this) * { * do @@ -211,9 +211,9 @@ class coroutine_ref; * } while (is_parent()); * ... client-specific handling follows ... * } @endcode - * + * * The logical steps involved in a @c fork are: - * + * * @li @c fork saves the current state of the coroutine. * @li The statement creates a copy of the coroutine and either executes it * immediately or schedules it for later execution. @@ -258,7 +258,6 @@ class coroutine int value_; }; - namespace detail { class coroutine_ref diff --git a/asio/include/asio/detached.hpp b/asio/include/asio/detached.hpp index b71bd9d978..070945570a 100644 --- a/asio/include/asio/detached.hpp +++ b/asio/include/asio/detached.hpp @@ -38,7 +38,7 @@ namespace asio { class detached_t { public: - /// Constructor. + /// Constructor. constexpr detached_t() { } diff --git a/asio/include/asio/detail/buffered_stream_storage.hpp b/asio/include/asio/detail/buffered_stream_storage.hpp index afe5cadffd..0d776aded1 100644 --- a/asio/include/asio/detail/buffered_stream_storage.hpp +++ b/asio/include/asio/detail/buffered_stream_storage.hpp @@ -113,7 +113,7 @@ class buffered_stream_storage // The offset to the end of the unread data. size_type end_offset_; - + // The data in the buffer. std::vector buffer_; }; diff --git a/asio/include/asio/detail/impl/dev_poll_reactor.ipp b/asio/include/asio/detail/impl/dev_poll_reactor.ipp index c9c53fbeaf..6b79bf876f 100644 --- a/asio/include/asio/detail/impl/dev_poll_reactor.ipp +++ b/asio/include/asio/detail/impl/dev_poll_reactor.ipp @@ -66,7 +66,7 @@ void dev_poll_reactor::shutdown() timer_queues_.get_all_timers(ops); scheduler_.abandon_operations(ops); -} +} void dev_poll_reactor::notify_fork( asio::execution_context::fork_event fork_ev) diff --git a/asio/include/asio/detail/impl/socket_select_interrupter.ipp b/asio/include/asio/detail/impl/socket_select_interrupter.ipp index a5b29581eb..d83d08300a 100644 --- a/asio/include/asio/detail/impl/socket_select_interrupter.ipp +++ b/asio/include/asio/detail/impl/socket_select_interrupter.ipp @@ -90,7 +90,7 @@ void socket_select_interrupter::open_descriptors() socket_holder server(socket_ops::accept(acceptor.get(), 0, 0, ec)); if (server.get() == invalid_socket) asio::detail::throw_error(ec, "socket_select_interrupter"); - + ioctl_arg_type non_blocking = 1; socket_ops::state_type client_state = 0; if (socket_ops::ioctl(client.get(), client_state, diff --git a/asio/include/asio/detail/impl/win_iocp_handle_service.ipp b/asio/include/asio/detail/impl/win_iocp_handle_service.ipp index 6136e27fb3..db8f4a857e 100644 --- a/asio/include/asio/detail/impl/win_iocp_handle_service.ipp +++ b/asio/include/asio/detail/impl/win_iocp_handle_service.ipp @@ -163,7 +163,7 @@ void win_iocp_handle_service::destroy( win_iocp_handle_service::implementation_type& impl) { close_for_destruction(impl); - + // Remove implementation from linked list of all implementations. asio::detail::mutex::scoped_lock lock(mutex_); if (impl_list_ == &impl) @@ -365,12 +365,12 @@ size_t win_iocp_handle_service::do_write( return 0; } - // Write the data. + // Write the data. overlapped.Offset = offset & 0xFFFFFFFF; overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF; BOOL ok = ::WriteFile(impl.handle_, buffer.data(), static_cast(buffer.size()), 0, &overlapped); - if (!ok) + if (!ok) { DWORD last_error = ::GetLastError(); if (last_error != ERROR_IO_PENDING) @@ -446,7 +446,7 @@ size_t win_iocp_handle_service::do_read( ASIO_ERROR_LOCATION(ec); return 0; } - + // A request to read 0 bytes on a stream handle is a no-op. if (buffer.size() == 0) { @@ -466,7 +466,7 @@ size_t win_iocp_handle_service::do_read( overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF; BOOL ok = ::ReadFile(impl.handle_, buffer.data(), static_cast(buffer.size()), 0, &overlapped); - if (!ok) + if (!ok) { DWORD last_error = ::GetLastError(); if (last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA) diff --git a/asio/include/asio/detail/reactive_socket_send_op.hpp b/asio/include/asio/detail/reactive_socket_send_op.hpp index ef7ec69933..1b83a34694 100644 --- a/asio/include/asio/detail/reactive_socket_send_op.hpp +++ b/asio/include/asio/detail/reactive_socket_send_op.hpp @@ -187,7 +187,6 @@ class reactive_socket_send_op : ASIO_HANDLER_INVOCATION_END; } - private: Handler handler_; handler_work work_; diff --git a/asio/include/asio/detail/resolve_endpoint_op.hpp b/asio/include/asio/detail/resolve_endpoint_op.hpp index c7cb2c4c10..fdde585c3b 100644 --- a/asio/include/asio/detail/resolve_endpoint_op.hpp +++ b/asio/include/asio/detail/resolve_endpoint_op.hpp @@ -77,7 +77,7 @@ class resolve_endpoint_op : public resolve_op { // The operation is being run on the worker io_context. Time to perform // the resolver operation. - + // Perform the blocking endpoint resolution operation. char host_name[NI_MAXHOST] = ""; char service_name[NI_MAXSERV] = ""; diff --git a/asio/include/asio/detail/resolve_query_op.hpp b/asio/include/asio/detail/resolve_query_op.hpp index b7f9e35cef..fc70a5b611 100644 --- a/asio/include/asio/detail/resolve_query_op.hpp +++ b/asio/include/asio/detail/resolve_query_op.hpp @@ -85,7 +85,7 @@ class resolve_query_op : public resolve_op { // The operation is being run on the worker io_context. Time to perform // the resolver operation. - + // Perform the blocking host resolution operation. socket_ops::background_getaddrinfo(o->cancel_token_, o->query_.host_name().c_str(), o->query_.service_name().c_str(), diff --git a/asio/include/asio/detail/win_iocp_socket_service_base.hpp b/asio/include/asio/detail/win_iocp_socket_service_base.hpp index a157143e35..6a983d7f67 100644 --- a/asio/include/asio/detail/win_iocp_socket_service_base.hpp +++ b/asio/include/asio/detail/win_iocp_socket_service_base.hpp @@ -808,7 +808,7 @@ class win_iocp_socket_service_base // Pointer to NtSetInformationFile implementation. void* nt_set_info_; - // Mutex to protect access to the linked list of implementations. + // Mutex to protect access to the linked list of implementations. asio::detail::mutex mutex_; // The head of a linked list of all implementations. diff --git a/asio/include/asio/detail/winrt_ssocket_service_base.hpp b/asio/include/asio/detail/winrt_ssocket_service_base.hpp index c752da80e2..626b3e6afb 100644 --- a/asio/include/asio/detail/winrt_ssocket_service_base.hpp +++ b/asio/include/asio/detail/winrt_ssocket_service_base.hpp @@ -341,7 +341,7 @@ class winrt_ssocket_service_base // The manager that keeps track of outstanding operations. winrt_async_manager& async_manager_; - // Mutex to protect access to the linked list of implementations. + // Mutex to protect access to the linked list of implementations. asio::detail::mutex mutex_; // The head of a linked list of all implementations. diff --git a/asio/include/asio/experimental/detail/coro_promise_allocator.hpp b/asio/include/asio/experimental/detail/coro_promise_allocator.hpp index aebab8c4e2..f740a1c9fb 100644 --- a/asio/include/asio/experimental/detail/coro_promise_allocator.hpp +++ b/asio/include/asio/experimental/detail/coro_promise_allocator.hpp @@ -64,7 +64,6 @@ constexpr std::size_t variadic_first(std::size_t = 0u) return std::numeric_limits::max(); } - template constexpr std::size_t variadic_first(std::size_t pos = 0u) { diff --git a/asio/include/asio/experimental/detail/partial_promise.hpp b/asio/include/asio/experimental/detail/partial_promise.hpp index 842f8b3237..5ca2931c5d 100644 --- a/asio/include/asio/experimental/detail/partial_promise.hpp +++ b/asio/include/asio/experimental/detail/partial_promise.hpp @@ -110,9 +110,7 @@ struct partial_promise : partial_promise_base } }; - - -}; // namespace detail +} // namespace detail } // namespace experimental } // namespace asio diff --git a/asio/include/asio/experimental/promise.hpp b/asio/include/asio/experimental/promise.hpp index 55484c54e1..3cb788eff3 100644 --- a/asio/include/asio/experimental/promise.hpp +++ b/asio/include/asio/experimental/promise.hpp @@ -140,7 +140,6 @@ struct promise */ ~promise() { cancel(); } - private: #if !defined(GENERATING_DOCUMENTATION) template friend struct promise; diff --git a/asio/include/asio/experimental/use_coro.hpp b/asio/include/asio/experimental/use_coro.hpp index 0248c6f6b0..57bc382051 100644 --- a/asio/include/asio/experimental/use_coro.hpp +++ b/asio/include/asio/experimental/use_coro.hpp @@ -84,7 +84,6 @@ struct use_coro_t { } - /// Specify an alternate allocator. template use_coro_t rebind(const OtherAllocator& allocator) const diff --git a/asio/include/asio/impl/spawn.hpp b/asio/include/asio/impl/spawn.hpp index 38a96406ed..51012f2625 100644 --- a/asio/include/asio/impl/spawn.hpp +++ b/asio/include/asio/impl/spawn.hpp @@ -975,7 +975,6 @@ class spawn_cancellation_handler Executor ex_; }; - template class spawn_cancellation_handler class redirect_error_t { public: - /// Constructor. + /// Constructor. template redirect_error_t(T&& completion_token, asio::error_code& ec) : token_(static_cast(completion_token)), diff --git a/asio/include/asio/registered_buffer.hpp b/asio/include/asio/registered_buffer.hpp index f563277b30..e298bf65b5 100644 --- a/asio/include/asio/registered_buffer.hpp +++ b/asio/include/asio/registered_buffer.hpp @@ -78,7 +78,7 @@ class registered_buffer_id }; /// Holds a registered buffer over modifiable data. -/** +/** * Satisfies the @c MutableBufferSequence type requirements. */ class mutable_registered_buffer @@ -149,7 +149,7 @@ class mutable_registered_buffer }; /// Holds a registered buffer over non-modifiable data. -/** +/** * Satisfies the @c ConstBufferSequence type requirements. */ class const_registered_buffer diff --git a/asio/include/asio/spawn.hpp b/asio/include/asio/spawn.hpp index eeacb49de6..92760293eb 100644 --- a/asio/include/asio/spawn.hpp +++ b/asio/include/asio/spawn.hpp @@ -145,7 +145,6 @@ class spawned_thread_base } }; - template struct spawn_signature { diff --git a/asio/include/asio/ssl/detail/impl/openssl_init.ipp b/asio/include/asio/ssl/detail/impl/openssl_init.ipp index 7a10cc2aa8..511809e328 100644 --- a/asio/include/asio/ssl/detail/impl/openssl_init.ipp +++ b/asio/include/asio/ssl/detail/impl/openssl_init.ipp @@ -37,7 +37,7 @@ public: { #if (OPENSSL_VERSION_NUMBER < 0x10100000L) ::SSL_library_init(); - ::SSL_load_error_strings(); + ::SSL_load_error_strings(); ::OpenSSL_add_all_algorithms(); mutexes_.resize(::CRYPTO_num_locks()); @@ -123,7 +123,7 @@ private: #endif // (OPENSSL_VERSION_NUMBER < 0x10000000L) #if (OPENSSL_VERSION_NUMBER < 0x10100000L) - static void openssl_locking_func(int mode, int n, + static void openssl_locking_func(int mode, int n, const char* /*file*/, int /*line*/) { if (mode & CRYPTO_LOCK) diff --git a/asio/include/asio/ssl/impl/context.ipp b/asio/include/asio/ssl/impl/context.ipp index 8711048b9a..fcc1ba5993 100644 --- a/asio/include/asio/ssl/impl/context.ipp +++ b/asio/include/asio/ssl/impl/context.ipp @@ -794,7 +794,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain( ASIO_SYNC_OP_VOID_RETURN(ec); } } - + result = ::ERR_peek_last_error(); if ((ERR_GET_LIB(result) == ERR_LIB_PEM) && (ERR_GET_REASON(result) == PEM_R_NO_START_LINE)) diff --git a/asio/src/examples/cpp11/executors/fork_join.cpp b/asio/src/examples/cpp11/executors/fork_join.cpp index 7e8a827356..58077ef342 100644 --- a/asio/src/examples/cpp11/executors/fork_join.cpp +++ b/asio/src/examples/cpp11/executors/fork_join.cpp @@ -76,7 +76,7 @@ class fork_join_pool auto p(queue_.front()); queue_.pop(); lock.unlock(); - execute(lock, p); + execute(lock, p); return true; } diff --git a/asio/src/examples/cpp11/icmp/icmp_header.hpp b/asio/src/examples/cpp11/icmp/icmp_header.hpp index 369511c626..347f13ab3a 100644 --- a/asio/src/examples/cpp11/icmp/icmp_header.hpp +++ b/asio/src/examples/cpp11/icmp/icmp_header.hpp @@ -18,7 +18,7 @@ // ICMP header for both IPv4 and IPv6. // // The wire format of an ICMP header is: -// +// // 0 8 16 31 // +---------------+---------------+------------------------------+ --- // | | | | ^ diff --git a/asio/src/examples/cpp11/icmp/ipv4_header.hpp b/asio/src/examples/cpp11/icmp/ipv4_header.hpp index d296571938..771dd345f5 100644 --- a/asio/src/examples/cpp11/icmp/ipv4_header.hpp +++ b/asio/src/examples/cpp11/icmp/ipv4_header.hpp @@ -17,7 +17,7 @@ // Packet header for IPv4. // // The wire format of an IPv4 header is: -// +// // 0 8 16 31 // +-------+-------+---------------+------------------------------+ --- // | | | | | ^ diff --git a/asio/src/examples/cpp11/ssl/server.cpp b/asio/src/examples/cpp11/ssl/server.cpp index 15e0d9eaf0..90fdb92fa6 100644 --- a/asio/src/examples/cpp11/ssl/server.cpp +++ b/asio/src/examples/cpp11/ssl/server.cpp @@ -33,7 +33,7 @@ class session : public std::enable_shared_from_this void do_handshake() { auto self(shared_from_this()); - socket_.async_handshake(asio::ssl::stream_base::server, + socket_.async_handshake(asio::ssl::stream_base::server, [this, self](const std::error_code& error) { if (!error) diff --git a/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp b/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp index 312f21ab65..4226b422d4 100644 --- a/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp +++ b/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp @@ -136,7 +136,7 @@ int main(int argc, char* argv[]) if (error) { - std::cout << "Receive error: " << error.message() << "\n"; + std::cout << "Receive error: " << error.message() << "\n"; } else { diff --git a/asio/src/examples/cpp14/executors/fork_join.cpp b/asio/src/examples/cpp14/executors/fork_join.cpp index 7e8a827356..58077ef342 100644 --- a/asio/src/examples/cpp14/executors/fork_join.cpp +++ b/asio/src/examples/cpp14/executors/fork_join.cpp @@ -76,7 +76,7 @@ class fork_join_pool auto p(queue_.front()); queue_.pop(); lock.unlock(); - execute(lock, p); + execute(lock, p); return true; } diff --git a/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp b/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp index 8bb7cdfd71..4623e03559 100644 --- a/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp +++ b/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp @@ -123,7 +123,7 @@ int main() values.end(), asio::use_future ).get(); - + auto end = std::chrono::high_resolution_clock::now(); auto duration = end - begin; diff --git a/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp b/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp index 6e9fa8bfda..94f564f6de 100644 --- a/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp +++ b/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp @@ -105,7 +105,7 @@ class line_based_echo_session : stop(); } } - + awaitable send_heartbeats() { steady_timer timer{socket_.get_executor()}; diff --git a/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp b/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp index b3381b44ed..bc5170196a 100644 --- a/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp +++ b/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp @@ -110,7 +110,7 @@ class line_based_echo_session : stop(); } } - + awaitable send_heartbeats() { steady_timer timer{socket_.get_executor()}; diff --git a/asio/src/tests/latency/udp_client.cpp b/asio/src/tests/latency/udp_client.cpp index 484ba085cd..2077674c05 100644 --- a/asio/src/tests/latency/udp_client.cpp +++ b/asio/src/tests/latency/udp_client.cpp @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) asio::error_code ec; socket.send_to(asio::buffer(write_buf), target, 0, ec); - + do socket.receive(asio::buffer(read_buf), 0, ec); while (ec == asio::error::would_block); diff --git a/asio/src/tests/unit/buffers_iterator.cpp b/asio/src/tests/unit/buffers_iterator.cpp index 071dc1bb8b..afd396bbd1 100644 --- a/asio/src/tests/unit/buffers_iterator.cpp +++ b/asio/src/tests/unit/buffers_iterator.cpp @@ -48,7 +48,6 @@ void test() vector cb3; cb3.push_back(buffer(cdata1)); - // buffers_iterator constructors. buffers_iterator bi1; diff --git a/asio/src/tests/unit/experimental/coro/allocator.cpp b/asio/src/tests/unit/experimental/coro/allocator.cpp index 845906df85..a2aa8e5fde 100644 --- a/asio/src/tests/unit/experimental/coro/allocator.cpp +++ b/asio/src/tests/unit/experimental/coro/allocator.cpp @@ -29,14 +29,13 @@ template struct tracked_allocator { using value_type = Value; - std::vector> & allocs, &deallocs; - - tracked_allocator(std::vector> & allocs, - std::vector> & deallocs) : allocs(allocs), deallocs(deallocs) {} + std::vector> &allocs, &deallocs; + tracked_allocator(std::vector>& allocs, + std::vector>& deallocs) : allocs(allocs), deallocs(deallocs) {} template - tracked_allocator(const tracked_allocator & a) : allocs(a.allocs), deallocs(a.deallocs) {} + tracked_allocator(const tracked_allocator& a) : allocs(a.allocs), deallocs(a.deallocs) {} value_type* allocate(std::size_t n) { @@ -52,7 +51,7 @@ struct tracked_allocator // ASIO_CHECK(allocs.back() == deallocs.back()); } - bool operator==(const tracked_allocator & rhs) const + bool operator==(const tracked_allocator& rhs) const { return &allocs == &rhs.allocs && &deallocs == &rhs.deallocs; @@ -60,7 +59,7 @@ struct tracked_allocator }; exp::coro> - alloc_test_impl(asio::io_context & ctx, int, std::allocator_arg_t, tracked_allocator ta, double) + alloc_test_impl(asio::io_context& ctx, int, std::allocator_arg_t, tracked_allocator ta, double) { co_return ; } diff --git a/asio/src/tests/unit/experimental/coro/cancel.cpp b/asio/src/tests/unit/experimental/coro/cancel.cpp index 38cf106790..31136ed6b9 100644 --- a/asio/src/tests/unit/experimental/coro/cancel.cpp +++ b/asio/src/tests/unit/experimental/coro/cancel.cpp @@ -28,7 +28,6 @@ namespace this_coro = asio::this_coro; namespace coro { - auto coro_simple_cancel_impl(asio::io_context& ) noexcept -> asio::experimental::coro { diff --git a/asio/src/tests/unit/experimental/coro/simple_test.cpp b/asio/src/tests/unit/experimental/coro/simple_test.cpp index f37159e431..2bd4614219 100644 --- a/asio/src/tests/unit/experimental/coro/simple_test.cpp +++ b/asio/src/tests/unit/experimental/coro/simple_test.cpp @@ -193,8 +193,7 @@ asio::awaitable completion_generator_test() ASIO_CHECK(!g.is_open()); ASIO_CHECK((res == std::vector{0,1,2,3,4,5,6,7,8,9})); -}; - +} void run_completion_generator_test() { @@ -246,7 +245,7 @@ asio::awaitable symmetrical_test() ASIO_CHECK(45 == (co_await g.async_resume(9, asio::use_awaitable)).value_or(-1)); -}; +} void run_symmetrical_test() { diff --git a/asio/src/tests/unit/unit_test.hpp b/asio/src/tests/unit/unit_test.hpp index 8efae9987e..135edb7135 100644 --- a/asio/src/tests/unit/unit_test.hpp +++ b/asio/src/tests/unit/unit_test.hpp @@ -24,7 +24,7 @@ // Prevent use of intrinsic for strcmp. # include # undef strcmp - + // Suppress error about condition always being true. # pragma option -w-ccc