mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
8639d8bc21
commit
d26aabff04
Notes:
sideshowbarker
2024-07-17 09:48:50 +09:00
Author: https://github.com/linusg
Commit: d26aabff04
Pull-request: https://github.com/SerenityOS/serenity/pull/15654
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
140 changed files with 1202 additions and 723 deletions
18
AK/Array.h
18
AK/Array.h
|
@ -37,8 +37,16 @@ struct Array {
|
|||
[[nodiscard]] constexpr T const& first() const { return at(0); }
|
||||
[[nodiscard]] constexpr T& first() { return at(0); }
|
||||
|
||||
[[nodiscard]] constexpr T const& last() const requires(Size > 0) { return at(Size - 1); }
|
||||
[[nodiscard]] constexpr T& last() requires(Size > 0) { return at(Size - 1); }
|
||||
[[nodiscard]] constexpr T const& last() const
|
||||
requires(Size > 0)
|
||||
{
|
||||
return at(Size - 1);
|
||||
}
|
||||
[[nodiscard]] constexpr T& last()
|
||||
requires(Size > 0)
|
||||
{
|
||||
return at(Size - 1);
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr bool is_empty() const { return size() == 0; }
|
||||
|
||||
|
@ -68,7 +76,8 @@ struct Array {
|
|||
return Size;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr T max() const requires(requires(T x, T y) { x < y; })
|
||||
[[nodiscard]] constexpr T max() const
|
||||
requires(requires(T x, T y) { x < y; })
|
||||
{
|
||||
static_assert(Size > 0, "No values to max() over");
|
||||
|
||||
|
@ -78,7 +87,8 @@ struct Array {
|
|||
return value;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr T min() const requires(requires(T x, T y) { x > y; })
|
||||
[[nodiscard]] constexpr T min() const
|
||||
requires(requires(T x, T y) { x > y; })
|
||||
{
|
||||
static_assert(Size > 0, "No values to min() over");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue