clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I6bbb587615b9d6f158900201ca04a647cb3a8f96
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/fd/line.cpp b/test/fd/line.cpp
index 8d9eb32..2913a25 100644
--- a/test/fd/line.cpp
+++ b/test/fd/line.cpp
@@ -1,4 +1,5 @@
-#include <gtest/gtest.h>
+#include <sys/mman.h>
+
#include <stdplus/exception.hpp>
#include <stdplus/fd/gmock.hpp>
#include <stdplus/fd/line.hpp>
@@ -6,8 +7,10 @@
#include <stdplus/fd/ops.hpp>
#include <stdplus/raw.hpp>
#include <stdplus/util/cexec.hpp>
+
#include <string_view>
-#include <sys/mman.h>
+
+#include <gtest/gtest.h>
namespace stdplus
{
@@ -70,7 +73,10 @@
inline auto readSv(std::string_view s)
{
return [s](std::span<std::byte> buf) {
- memcpy(buf.data(), s.data(), s.size());
+ if (s.size())
+ {
+ memcpy(buf.data(), s.data(), s.size());
+ }
return buf.subspan(0, s.size());
};
}