clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I4635e7b93b66ada3ab5390a21cf465919059fbc1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/fd/ops.cpp b/src/fd/ops.cpp
index ca549f7..c069a5a 100644
--- a/src/fd/ops.cpp
+++ b/src/fd/ops.cpp
@@ -20,8 +20,8 @@
{
while (total < data.size())
{
- auto r = (fd.*fun)(data.subspan(total),
- std::forward<Args>(args)...);
+ auto r =
+ (fd.*fun)(data.subspan(total), std::forward<Args>(args)...);
if (r.size() == 0)
{
throw exception::WouldBlock(
@@ -76,17 +76,17 @@
}
template <typename Fun, typename Byte, typename... Args>
-static std::span<Byte> opAligned(const char* name, Fun&& fun, Fd& fd,
- size_t align, std::span<Byte> data,
- Args&&... args)
+static std::span<Byte>
+ opAligned(const char* name, Fun&& fun, Fd& fd, size_t align,
+ std::span<Byte> data, Args&&... args)
{
std::size_t total = 0;
try
{
do
{
- auto r = (fd.*fun)(data.subspan(total),
- std::forward<Args>(args)...);
+ auto r =
+ (fd.*fun)(data.subspan(total), std::forward<Args>(args)...);
if (total != 0 && r.size() == 0)
{
throw exception::Incomplete(
@@ -124,9 +124,8 @@
return opAligned("writeAligned", &Fd::write, fd, align, data);
}
-std::span<const std::byte> sendAligned(Fd& fd, size_t align,
- std::span<const std::byte> data,
- SendFlags flags)
+std::span<const std::byte> sendAligned(
+ Fd& fd, size_t align, std::span<const std::byte> data, SendFlags flags)
{
return opAligned("sendAligned", &Fd::send, fd, align, data, flags);
}