mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:57:35 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
8639d8bc21
commit
d26aabff04
140 changed files with 1202 additions and 723 deletions
|
@ -230,7 +230,7 @@ public:
|
|||
|
||||
private:
|
||||
template<typename T>
|
||||
bool compare(const T& left, const T& right) const
|
||||
bool compare(T const& left, T const& right) const
|
||||
{
|
||||
switch (m_op) {
|
||||
case ComparisonOperation::Less:
|
||||
|
|
|
@ -251,8 +251,11 @@ struct BitflagOption {
|
|||
StringView name;
|
||||
};
|
||||
|
||||
#define BITFLAG(NAME) \
|
||||
BitflagOption { NAME, #NAME##sv }
|
||||
#define BITFLAG(NAME) \
|
||||
BitflagOption \
|
||||
{ \
|
||||
NAME, #NAME##sv \
|
||||
}
|
||||
|
||||
struct BitflagBase {
|
||||
int flagset;
|
||||
|
|
|
@ -31,8 +31,11 @@ static ErrorOr<void> test_once()
|
|||
})));
|
||||
threads.last().start();
|
||||
}
|
||||
// clang-format off
|
||||
// It wants to put [[maybe_unused]] on its own line, for some reason.
|
||||
for (auto& thread : threads)
|
||||
[[maybe_unused]] auto res = thread.join();
|
||||
// clang-format on
|
||||
|
||||
VERIFY(v.size() == 1);
|
||||
|
||||
|
@ -61,8 +64,11 @@ static ErrorOr<void> test_mutex()
|
|||
})));
|
||||
threads.last().start();
|
||||
}
|
||||
// clang-format off
|
||||
// It wants to put [[maybe_unused]] on its own line, for some reason.
|
||||
for (auto& thread : threads)
|
||||
[[maybe_unused]] auto res = thread.join();
|
||||
// clang-format on
|
||||
|
||||
VERIFY(v.size() == threads_count * num_times);
|
||||
VERIFY(pthread_mutex_trylock(&mutex) == 0);
|
||||
|
@ -94,8 +100,11 @@ static ErrorOr<void> test_semaphore_as_lock()
|
|||
})));
|
||||
threads.last().start();
|
||||
}
|
||||
// clang-format off
|
||||
// It wants to put [[maybe_unused]] on its own line, for some reason.
|
||||
for (auto& thread : threads)
|
||||
[[maybe_unused]] auto res = thread.join();
|
||||
// clang-format on
|
||||
|
||||
VERIFY(v.size() == threads_count * num_times);
|
||||
VERIFY(sem_trywait(&semaphore) == 0);
|
||||
|
@ -162,9 +171,11 @@ static ErrorOr<void> test_semaphore_nonbinary()
|
|||
})));
|
||||
threads.last().start();
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
// It wants to put [[maybe_unused]] on its own line, for some reason.
|
||||
for (auto& thread : threads)
|
||||
[[maybe_unused]] auto res = thread.join();
|
||||
// clang-format on
|
||||
|
||||
VERIFY(value.load() == 0);
|
||||
VERIFY(seen_more_than_two.load());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue