1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:47:44 +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

@ -9,7 +9,7 @@
#include <AK/BitCast.h>
template<typename A, typename B>
void check_cast_both_ways(const A& a, const B& b)
void check_cast_both_ways(A const& a, B const& b)
{
EXPECT_EQ((bit_cast<A, B>(b)), a);
EXPECT_EQ((bit_cast<B, A>(a)), b);

View file

@ -103,7 +103,7 @@ TEST_CASE(can_subspan_as_intended)
{
static constexpr u16 buffer[8] { 1, 2, 3, 4, 5, 6, 7, 8 };
constexpr Span<const u16> span { buffer, 8 };
constexpr Span<u16 const> span { buffer, 8 };
constexpr auto slice = span.slice(3, 2);
static_assert(slice.size() == 2u);

View file

@ -166,7 +166,7 @@ TEST_CASE(IsAssignable)
EXPECT_TRAIT_TRUE(IsTriviallyMoveAssignable, A);
struct B {
B& operator=(const B&) { return *this; }
B& operator=(B const&) { return *this; }
B& operator=(B&&) { return *this; }
};
EXPECT_TRAIT_TRUE(IsCopyAssignable, B);
@ -175,7 +175,7 @@ TEST_CASE(IsAssignable)
EXPECT_TRAIT_FALSE(IsTriviallyMoveAssignable, B);
struct C {
C& operator=(const C&) = delete;
C& operator=(C const&) = delete;
C& operator=(C&&) = delete;
};
EXPECT_TRAIT_FALSE(IsCopyAssignable, C);
@ -194,7 +194,7 @@ TEST_CASE(IsConstructible)
EXPECT_TRAIT_TRUE(IsTriviallyMoveConstructible, A);
struct B {
B(const B&)
B(B const&)
{
}
B(B&&)
@ -207,7 +207,7 @@ TEST_CASE(IsConstructible)
EXPECT_TRAIT_FALSE(IsTriviallyMoveConstructible, B);
struct C {
C(const C&) = delete;
C(C const&) = delete;
C(C&&) = delete;
};
EXPECT_TRAIT_FALSE(IsCopyConstructible, C);

View file

@ -24,7 +24,8 @@ static PosixOptions match_test_api_options(const PosixOptions options)
}
template<typename... Flags>
static constexpr ECMAScriptFlags combine_flags(Flags&&... flags) requires((IsSame<Flags, ECMAScriptFlags> && ...))
static constexpr ECMAScriptFlags combine_flags(Flags&&... flags)
requires((IsSame<Flags, ECMAScriptFlags> && ...))
{
return static_cast<ECMAScriptFlags>((static_cast<regex::FlagsUnderlyingType>(flags) | ...));
}