1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:17:34 +00:00

Everywhere: Run clang-format

This commit is contained in:
Linus Groh 2022-10-17 00:06:11 +02:00
parent 8639d8bc21
commit d26aabff04
140 changed files with 1202 additions and 723 deletions

View file

@ -43,7 +43,8 @@ constexpr void const* bitap_bitwise(void const* haystack, size_t haystack_length
}
template<typename HaystackIterT>
inline Optional<size_t> memmem(HaystackIterT const& haystack_begin, HaystackIterT const& haystack_end, Span<const u8> needle) requires(requires { (*haystack_begin).data(); (*haystack_begin).size(); })
inline Optional<size_t> memmem(HaystackIterT const& haystack_begin, HaystackIterT const& haystack_end, Span<u8 const> needle)
requires(requires { (*haystack_begin).data(); (*haystack_begin).size(); })
{
auto prepare_kmp_partial_table = [&] {
Vector<int, 64> table;
@ -122,7 +123,7 @@ inline Optional<size_t> memmem_optional(void const* haystack, size_t haystack_le
}
// Fallback to KMP.
Array<Span<const u8>, 1> spans { Span<const u8> { (u8 const*)haystack, haystack_length } };
Array<Span<u8 const>, 1> spans { Span<u8 const> { (u8 const*)haystack, haystack_length } };
return memmem(spans.begin(), spans.end(), { (u8 const*)needle, needle_length });
}