Skip to content

Commit

Permalink
Clean up spurious white space.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Jun 27, 2024
1 parent bd6b155 commit 79f17e9
Show file tree
Hide file tree
Showing 45 changed files with 58 additions and 72 deletions.
6 changes: 3 additions & 3 deletions asio/include/asio/basic_datagram_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -1219,7 +1219,7 @@ class basic_datagram_socket
const basic_datagram_socket&) = delete;

class initiate_async_send
{
{
public:
typedef Executor executor_type;

Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/basic_deadline_timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace asio {
* timer.wait();
* @endcode
*
* @par
* @par
* Performing an asynchronous wait:
* @code
* void handler(const asio::error_code& error)
Expand Down
4 changes: 2 additions & 2 deletions asio/include/asio/basic_raw_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/basic_waitable_timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions asio/include/asio/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/buffer_registration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 0 additions & 1 deletion asio/include/asio/cancel_at.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/**
Expand Down
7 changes: 3 additions & 4 deletions asio/include/asio/coroutine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -258,7 +258,6 @@ class coroutine
int value_;
};


namespace detail {

class coroutine_ref
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detached.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace asio {
class detached_t
{
public:
/// Constructor.
/// Constructor.
constexpr detached_t()
{
}
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detail/buffered_stream_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<byte_type> buffer_;
};
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detail/impl/dev_poll_reactor.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions asio/include/asio/detail/impl/win_iocp_handle_service.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<DWORD>(buffer.size()), 0, &overlapped);
if (!ok)
if (!ok)
{
DWORD last_error = ::GetLastError();
if (last_error != ERROR_IO_PENDING)
Expand Down Expand Up @@ -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)
{
Expand All @@ -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<DWORD>(buffer.size()), 0, &overlapped);
if (!ok)
if (!ok)
{
DWORD last_error = ::GetLastError();
if (last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
Expand Down
1 change: 0 additions & 1 deletion asio/include/asio/detail/reactive_socket_send_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ class reactive_socket_send_op :
ASIO_HANDLER_INVOCATION_END;
}


private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detail/resolve_endpoint_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] = "";
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detail/resolve_query_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detail/win_iocp_socket_service_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detail/winrt_ssocket_service_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ constexpr std::size_t variadic_first(std::size_t = 0u)
return std::numeric_limits<std::size_t>::max();
}


template <typename T, typename First, typename... Args>
constexpr std::size_t variadic_first(std::size_t pos = 0u)
{
Expand Down
4 changes: 1 addition & 3 deletions asio/include/asio/experimental/detail/partial_promise.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ struct partial_promise : partial_promise_base<Allocator>
}
};



}; // namespace detail
} // namespace detail
} // namespace experimental
} // namespace asio

Expand Down
1 change: 0 additions & 1 deletion asio/include/asio/experimental/promise.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ struct promise<void(Ts...), Executor, Allocator>
*/
~promise() { cancel(); }


private:
#if !defined(GENERATING_DOCUMENTATION)
template <typename, typename, typename> friend struct promise;
Expand Down
1 change: 0 additions & 1 deletion asio/include/asio/experimental/use_coro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ struct use_coro_t
{
}


/// Specify an alternate allocator.
template <typename OtherAllocator>
use_coro_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
Expand Down
1 change: 0 additions & 1 deletion asio/include/asio/impl/spawn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,6 @@ class spawn_cancellation_handler
Executor ex_;
};


template <typename Handler, typename Executor>
class spawn_cancellation_handler<Handler, Executor,
enable_if_t<
Expand Down
10 changes: 5 additions & 5 deletions asio/include/asio/io_context_strand.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ namespace asio {
* if any of the following conditions are true:
*
* @li @c s.post(a) happens-before @c s.post(b)
*
*
* @li @c s.post(a) happens-before @c s.dispatch(b), where the latter is
* performed outside the strand
*
*
* @li @c s.dispatch(a) happens-before @c s.post(b), where the former is
* performed outside the strand
*
*
* @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are
* performed outside the strand
*
*
* then @c a() happens-before @c b()
*
*
* Note that in the following case:
* @code async_op_1(..., s.wrap(a));
* async_op_2(..., s.wrap(b)); @endcode
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/ip/detail/socket_option.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class multicast_enable_loopback
#if defined(__sun) || defined(__osf__)
typedef unsigned char ipv4_value_type;
typedef unsigned char ipv6_value_type;
#elif defined(_AIX) || defined(__hpux) || defined(__QNXNTO__)
#elif defined(_AIX) || defined(__hpux) || defined(__QNXNTO__)
typedef unsigned char ipv4_value_type;
typedef unsigned int ipv6_value_type;
#else
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/redirect_error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ template <typename CompletionToken>
class redirect_error_t
{
public:
/// Constructor.
/// Constructor.
template <typename T>
redirect_error_t(T&& completion_token, asio::error_code& ec)
: token_(static_cast<T&&>(completion_token)),
Expand Down
4 changes: 2 additions & 2 deletions asio/include/asio/registered_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion asio/include/asio/spawn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ class spawned_thread_base
}
};


template <typename T>
struct spawn_signature
{
Expand Down
4 changes: 2 additions & 2 deletions asio/include/asio/ssl/detail/impl/openssl_init.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/ssl/impl/context.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion asio/src/examples/cpp11/executors/fork_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class fork_join_pool
auto p(queue_.front());
queue_.pop();
lock.unlock();
execute(lock, p);
execute(lock, p);
return true;
}

Expand Down
Loading

0 comments on commit 79f17e9

Please sign in to comment.